diff options
author | delphij <delphij@FreeBSD.org> | 2014-07-11 00:00:00 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2014-07-11 00:00:00 +0000 |
commit | a8fc83ae7c6014d3e0809848ce57e6dbd9e6b430 (patch) | |
tree | 942bc382f7aca8fc1809046d5db53f7a55fae1f0 /contrib/file/install-sh | |
parent | 8674b3c2aa3ad356a99168b86179e3ae4d898506 (diff) | |
download | FreeBSD-src-a8fc83ae7c6014d3e0809848ce57e6dbd9e6b430.zip FreeBSD-src-a8fc83ae7c6014d3e0809848ce57e6dbd9e6b430.tar.gz |
MFC r267897: MFV r267843:
Update file/libmagic to 5.19.
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" |