mdirs: add usage

This commit is contained in:
Christian Neukirchen 2016-07-26 21:57:12 +02:00
parent ee90013fbc
commit 80763d98f9

12
mdirs.c
View File

@ -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]);