diff options
author | Jim Meyering <jim@meyering.net> | 1993-04-04 14:41:38 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1993-04-04 14:41:38 +0000 |
commit | a92a94f719519ab5a06a2b704c656de9b4c4dc1c (patch) | |
tree | 0539f01dbe189f038925e9fb4e5bd111df213c12 /src/install.c | |
parent | dc932e0a18cfa5a754dbfae62457d8ed7fffa2e7 (diff) | |
download | coreutils-a92a94f719519ab5a06a2b704c656de9b4c4dc1c.tar.xz |
(usage): Mention --help and --version.
(main): Handle flag_help and flag_version before checking for invocation errors.
Diffstat (limited to 'src/install.c')
-rw-r--r-- | src/install.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/install.c b/src/install.c index dd8b58cc7..d2ad40b0b 100644 --- a/src/install.c +++ b/src/install.c @@ -194,18 +194,18 @@ main (argc, argv) } } - /* Check for invalid combinations of arguments. */ - if ((dir_arg && strip_files) - || (optind == argc) - || (optind == argc - 1 && !dir_arg)) - usage (); - if (flag_version) fprintf (stderr, "%s\n", version_string); if (flag_help) usage (); + /* Check for invalid combinations of arguments. */ + if ((dir_arg && strip_files) + || (optind == argc) + || (optind == argc - 1 && !dir_arg)) + usage (); + if (symbolic_mode) { struct mode_change *change = mode_compile (symbolic_mode, 0); @@ -511,8 +511,8 @@ Usage: %s [options] [-s] [--strip] source dest\n\ %s [options] [-s] [--strip] source... directory\n\ %s [options] {-d,--directory} directory...\n\ Options:\n\ - [-c] [-g group] [-m mode] [-o owner]\n\ - [--group=group] [--mode=mode] [--owner=owner]\n", + [-c] [-g group] [-m mode] [-o owner] [--group=group]\n\ + [--help] [--version] [--mode=mode] [--owner=owner]\n", program_name, program_name, program_name); exit (1); } |