From 4b30979086d87ab4653462e770746605a26e7328 Mon Sep 17 00:00:00 2001 From: Arun Thomas Date: Mon, 12 Jul 2010 13:38:13 +0000 Subject: [PATCH] Install(1): Allow -c option with -d Contributed by Gautam Tirumala --- commands/install/install.c | 4 ++-- man/man1/install.1 | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/commands/install/install.c b/commands/install/install.c index 45483485c..e65671045 100644 --- a/commands/install/install.c +++ b/commands/install/install.c @@ -428,7 +428,7 @@ void usage(void) Usage:\n\ install [-lcpsz#] [-o owner] [-g group] [-m mode] [-S stack] [file1] file2\n\ install [-lcpsz#] [-o owner] [-g group] [-m mode] [-S stack] file ... dir\n\ - install -d [-o owner] [-g group] [-m mode] directory\n"); + install [-c] -d [-o owner] [-g group] [-m mode] directory\n"); exit(1); } @@ -600,7 +600,7 @@ int main(int argc, char **argv) } } /* Some options don't mix. */ - if (dflag && (cflag || lflag || strip)) usage(); + if (dflag && (lflag || strip)) usage(); /* Don't let the user umask interfere. */ umask(000); diff --git a/man/man1/install.1 b/man/man1/install.1 index 386b8a053..aea097f49 100644 --- a/man/man1/install.1 +++ b/man/man1/install.1 @@ -33,7 +33,9 @@ install \- install files .IR file " ... " dir .br .ti -5 -.B install \-d +.B install +.RB [ \-c ] +.B \-d .RB [ \-o .IR owner ] .RB [ \-g @@ -89,7 +91,11 @@ Copy the source file to its proper place. This option is the default if .B \-l is not given. With .BR \-l , -the file is copied if the link fails. +the file is copied if the link fails. This option is also allowed with +.BR \-d . +In this case the +.BR \-c +is ignored. .TP .B \-p Preserve timestamp on source file or directory.