aboutsummaryrefslogtreecommitdiff
path: root/coreutils/install.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/install.c')
-rw-r--r--coreutils/install.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/coreutils/install.c b/coreutils/install.c
index 7739fb615..90b3ef31b 100644
--- a/coreutils/install.c
+++ b/coreutils/install.c
@@ -39,6 +39,7 @@
39#define INSTALL_OPT_MODE 32 39#define INSTALL_OPT_MODE 32
40#define INSTALL_OPT_OWNER 64 40#define INSTALL_OPT_OWNER 64
41 41
42#if ENABLE_FEATURE_INSTALL_LONG_OPTIONS
42static const struct option install_long_options[] = { 43static const struct option install_long_options[] = {
43 { "directory", 0, NULL, 'd' }, 44 { "directory", 0, NULL, 'd' },
44 { "preserve-timestamps", 0, NULL, 'p' }, 45 { "preserve-timestamps", 0, NULL, 'p' },
@@ -48,6 +49,7 @@ static const struct option install_long_options[] = {
48 { "owner", 0, NULL, 'o' }, 49 { "owner", 0, NULL, 'o' },
49 { 0, 0, 0, 0 } 50 { 0, 0, 0, 0 }
50}; 51};
52#endif
51 53
52int install_main(int argc, char **argv) 54int install_main(int argc, char **argv)
53{ 55{
@@ -60,7 +62,9 @@ int install_main(int argc, char **argv)
60 int copy_flags = FILEUTILS_DEREFERENCE | FILEUTILS_FORCE; 62 int copy_flags = FILEUTILS_DEREFERENCE | FILEUTILS_FORCE;
61 int ret = EXIT_SUCCESS, flags, i, isdir; 63 int ret = EXIT_SUCCESS, flags, i, isdir;
62 64
65#if ENABLE_FEATURE_INSTALL_LONG_OPTIONS
63 bb_applet_long_options = install_long_options; 66 bb_applet_long_options = install_long_options;
67#endif
64 bb_opt_complementally = "?:s--d:d--s"; 68 bb_opt_complementally = "?:s--d:d--s";
65 /* -c exists for backwards compatibility, its needed */ 69 /* -c exists for backwards compatibility, its needed */
66 flags = bb_getopt_ulflags(argc, argv, "cdpsg:m:o:", &gid_str, &mode_str, &uid_str); /* 'a' must be 2nd */ 70 flags = bb_getopt_ulflags(argc, argv, "cdpsg:m:o:", &gid_str, &mode_str, &uid_str); /* 'a' must be 2nd */