summaryrefslogtreecommitdiff
path: root/lib/install-sh
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2013-10-30 23:17:55 +0000
committerStefano Lattarini <stefano.lattarini@gmail.com>2013-10-30 23:17:55 +0000
commit006ca8d920f41c9bcc157e53e92b420d7a8f162e (patch)
treefe2dfeafc2f0fc241e56b1917b557c75bc5c3c76 /lib/install-sh
parentbd44db1abdeea3643ba0387de24af7539da644e4 (diff)
downloadautomake-006ca8d920f41c9bcc157e53e92b420d7a8f162e.tar.gz
install-sh: assume that "set -f" and "set +f" work...
... and disable/enable shell globbing, respectively. This is mandated by POSIX, and supported even by Solaris 9 /bin/sh (one of the most braindead shells we still support). * lib/install.sh: Adjust. * NEWS: Update. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'lib/install-sh')
-rwxr-xr-xlib/install-sh24
1 files changed, 4 insertions, 20 deletions
diff --git a/lib/install-sh b/lib/install-sh
index 9a7bad82f..be3c5d94c 100755
--- a/lib/install-sh
+++ b/lib/install-sh
@@ -63,17 +63,6 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
-posix_glob='?'
-initialize_posix_glob='
- test "$posix_glob" != "?" || {
- if (set -f) 2>/dev/null; then
- posix_glob=
- else
- posix_glob=:
- fi
- }
-'
-
posix_mkdir=
# Desired mode of installed file.
@@ -365,14 +354,12 @@ do
*) prefix='';;
esac
- eval "$initialize_posix_glob"
-
oIFS=$IFS
IFS=/
- $posix_glob set -f
+ set -f
set fnord $dstdir
shift
- $posix_glob set +f
+ set +f
IFS=$oIFS
prefixes=
@@ -443,13 +430,10 @@ do
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
-
- eval "$initialize_posix_glob" &&
- $posix_glob set -f &&
+ set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
- $posix_glob set +f &&
-
+ set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then