summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-02-14 02:36:16 +0000
committerJim Meyering <jim@meyering.net>1999-02-14 02:36:16 +0000
commit0fbe67a14616b01ad476f8a9d0bc5aec05a302c3 (patch)
tree4e8e0d52093fcc6e8f63d3dda1ea38533549abd3 /src
parenta0a658c1f65c6475f9904ec504c9a53c19a08b9e (diff)
downloadcoreutils-0fbe67a14616b01ad476f8a9d0bc5aec05a302c3.tar.xz
(main): Set x.backup_type only if backups are requested.
(cp_option_init): Initialize backup_type. (backup_type): Remove unused variable.
Diffstat (limited to 'src')
-rw-r--r--src/install.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/install.c b/src/install.c
index f736b655b..757a710aa 100644
--- a/src/install.c
+++ b/src/install.c
@@ -1,5 +1,5 @@
/* install - copy files and set attributes
- Copyright (C) 89, 90, 91, 95, 96, 97, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 89, 90, 91, 1995-1999 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -141,9 +141,6 @@ void usage PARAMS ((int status));
/* The name this program was run with, for error messages. */
char *program_name;
-/* FIXME: document */
-enum backup_type backup_type;
-
/* The user name that will own the files, or NULL to make the owner
the current user ID. */
static char *owner_name;
@@ -213,6 +210,7 @@ cp_option_init (struct cp_options *x)
x->recursive = 0;
x->sparse_mode = SPARSE_AUTO;
x->symbolic_link = 0;
+ x->backup_type = none;
/* Create destination files initially writable so we can run strip on them.
Although GNU strip works fine on read-only files, some others
@@ -321,7 +319,8 @@ main (int argc, char **argv)
error (1, 0,
_("the strip option may not be used when installing a directory"));
- x.backup_type = xget_version ("--version-control", version);
+ if (make_backups)
+ x.backup_type = xget_version ("--version-control", version);
n_files = argc - optind;
file = argv + optind;