summaryrefslogtreecommitdiff
path: root/build-aux/install-sh
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2005-08-13 21:06:17 +0000
committerJim Meyering <jim@meyering.net>2005-08-13 21:06:17 +0000
commit2a775eb67deb6b34092caeb3ca0ce3bea7e19c36 (patch)
treeca9b9b7b06d08b02c8c3451647d835ef446d5a39 /build-aux/install-sh
parent24198ff68063d85330343b88d4a5f18126411b3b (diff)
downloadcoreutils-2a775eb67deb6b34092caeb3ca0ce3bea7e19c36.tar.xz
update from gnulib
Diffstat (limited to 'build-aux/install-sh')
-rwxr-xr-xbuild-aux/install-sh26
1 files changed, 13 insertions, 13 deletions
diff --git a/build-aux/install-sh b/build-aux/install-sh
index 4d4a9519e..f56e14764 100755
--- a/build-aux/install-sh
+++ b/build-aux/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2005-05-14.22
+scriptversion=2005-07-09.12
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -219,28 +219,28 @@ do
# Skip lots of stat calls in the usual case.
if test ! -d "$dstdir"; then
- defaultIFS='
- '
- IFS="${IFS-$defaultIFS}"
-
+ case $dstdir in
+ /*) pathcomp=/ ;;
+ -*) pathcomp=./ ;;
+ *) pathcomp= ;;
+ esac
oIFS=$IFS
- # Some sh's can't handle IFS=/ for some reason.
- IFS='%'
- set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+ IFS=/
+ set fnord $dstdir
shift
IFS=$oIFS
- pathcomp=
+ for d
+ do
+ test "x$d" = x && continue
- while test $# -ne 0 ; do
- pathcomp=$pathcomp$1
- shift
+ pathcomp=$pathcomp$d
if test ! -d "$pathcomp"; then
$mkdirprog "$pathcomp"
# mkdir can fail with a `File exist' error in case several
# install-sh are creating the directory concurrently. This
# is OK.
- test -d "$pathcomp" || exit
+ test -d "$pathcomp" || exit 1
fi
pathcomp=$pathcomp/
done