summaryrefslogtreecommitdiff
path: root/src/rmdir.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1993-04-04 14:41:38 +0000
committerJim Meyering <jim@meyering.net>1993-04-04 14:41:38 +0000
commita92a94f719519ab5a06a2b704c656de9b4c4dc1c (patch)
tree0539f01dbe189f038925e9fb4e5bd111df213c12 /src/rmdir.c
parentdc932e0a18cfa5a754dbfae62457d8ed7fffa2e7 (diff)
downloadcoreutils-a92a94f719519ab5a06a2b704c656de9b4c4dc1c.tar.xz
(usage): Mention --help and --version.
(main): Handle flag_help and flag_version before checking for invocation errors.
Diffstat (limited to 'src/rmdir.c')
-rw-r--r--src/rmdir.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rmdir.c b/src/rmdir.c
index aaaeb4df6..a53235389 100644
--- a/src/rmdir.c
+++ b/src/rmdir.c
@@ -79,15 +79,15 @@ main (argc, argv)
}
}
- if (optind == argc)
- usage ();
-
if (flag_version)
fprintf (stderr, "%s\n", version_string);
if (flag_help)
usage ();
+ if (optind == argc)
+ usage ();
+
for (; optind < argc; ++optind)
{
/* Stripping slashes is harmless for rmdir;
@@ -131,7 +131,7 @@ remove_parents (path)
static void
usage ()
{
- fprintf (stderr, "Usage: %s [-p] [--path] dir...\n",
+ fprintf (stderr, "Usage: %s [-p] [--path] [--help] [--version] dir...\n",
program_name);
exit (1);
}