mirror of
https://github.com/leahneukirchen/mblaze
synced 2024-11-09 19:10:32 +00:00
mdirs: add usage
This commit is contained in:
parent
ee90013fbc
commit
80763d98f9
12
mdirs.c
12
mdirs.c
@ -69,7 +69,17 @@ mdirs(char *fpath)
|
|||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int i;
|
int c, i;
|
||||||
|
while ((c = getopt(argc, argv, "")) != -1)
|
||||||
|
switch(c) {
|
||||||
|
default:
|
||||||
|
usage:
|
||||||
|
fprintf(stderr, "Usage: mdirs dirs...\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (argc == optind)
|
||||||
|
goto usage;
|
||||||
|
|
||||||
for (i = 0; i < argc; i++)
|
for (i = 0; i < argc; i++)
|
||||||
mdirs(argv[i]);
|
mdirs(argv[i]);
|
||||||
|
Loading…
Reference in New Issue
Block a user