diff options
author | hans <hans@pkgsrc.org> | 2012-01-11 13:07:31 +0000 |
---|---|---|
committer | hans <hans@pkgsrc.org> | 2012-01-11 13:07:31 +0000 |
commit | 4e989b9506d4d9f2132ba7ba54d6fd162262a5ee (patch) | |
tree | 1dd789d4e6cb2b7647df928e4898282ed23469e5 /sysutils | |
parent | 1ccb70b14bbd31a7d14a2aad739ce6786ead4525 (diff) | |
download | pkgsrc-4e989b9506d4d9f2132ba7ba54d6fd162262a5ee.tar.gz |
Support -p and -mXXX arguments.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/install-sh/files/install-sh.in | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sysutils/install-sh/files/install-sh.in b/sysutils/install-sh/files/install-sh.in index 65a8df79622..003f8db8093 100644 --- a/sysutils/install-sh/files/install-sh.in +++ b/sysutils/install-sh/files/install-sh.in @@ -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 @DEFAULT_INSTALL_MODE@" chmodcmd="$chmodprog @DEFAULT_INSTALL_MODE@" 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" |