diff options
author | delphij <delphij@FreeBSD.org> | 2014-06-26 06:03:39 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2014-06-26 06:03:39 +0000 |
commit | cd5514ba3b318b16aa00b1048bf9160a9f28fb35 (patch) | |
tree | 5b4f7850752944df750e0c678951b78d9484b67e /contrib/file/install-sh | |
parent | 8b39363d0d5f3d274de63dac41aaba59cdf00cdb (diff) | |
parent | 02573f2d7154bbe159ba99728d5db9be8a29bd9b (diff) | |
download | FreeBSD-src-cd5514ba3b318b16aa00b1048bf9160a9f28fb35.zip FreeBSD-src-cd5514ba3b318b16aa00b1048bf9160a9f28fb35.tar.gz |
MFV r267843: update file/libmagic to 5.19.
MFC after: 2 weeks
Diffstat (limited to 'contrib/file/install-sh')
-rwxr-xr-x | contrib/file/install-sh | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/contrib/file/install-sh b/contrib/file/install-sh index 68b8100..b12c0f7 100755 --- a/contrib/file/install-sh +++ b/contrib/file/install-sh @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: install-sh.in,v 1.5 2010/10/08 19:57:05 tez Exp $ +# $NetBSD: install-sh.in,v 1.6 2012/01/11 13:07:31 hans Exp $ # This script now also installs multiple files, but might choke on installing # multiple files with spaces in the file names. # @@ -45,6 +45,7 @@ rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" instcmd="$cpprog" +instflags="" pathcompchmodcmd="$chmodprog 755" chmodcmd="$chmodprog 755" chowncmd="" @@ -84,6 +85,11 @@ while [ x"$1" != x ]; do shift continue;; + -m*) + chmodcmd="$chmodprog ${1#-m}" + shift + continue;; + -o) chowncmd="$chownprog $2" shift shift @@ -104,6 +110,10 @@ while [ x"$1" != x ]; do shift continue;; + -p) instflags="-p" + shift + continue;; + *) if [ x"$msrc" = x ] then msrc="$dst" @@ -154,7 +164,7 @@ else if [ -f "$srcarg" ] then - doinst="$instcmd" + doinst="$instcmd $instflags" elif [ -d "$srcarg" ] then echo "install: $srcarg: not a regular file" |