INN commit: branches/2.5/support (install-sh)
INN Commit
rra at isc.org
Sat Aug 6 20:54:41 UTC 2011
Date: Saturday, August 6, 2011 @ 13:54:41
Author: iulius
Revision: 9323
update our support files to the latest automake version (HEAD)
Modified:
branches/2.5/support/install-sh
------------+
install-sh | 38 +++++++++++++++++++++++---------------
1 file changed, 23 insertions(+), 15 deletions(-)
Modified: install-sh
===================================================================
--- install-sh 2011-08-06 20:44:19 UTC (rev 9322)
+++ install-sh 2011-08-06 20:54:41 UTC (rev 9323)
@@ -1,18 +1,19 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2010-02-06.18; # UTC
+scriptversion=2011-01-19.21; # UTC
#############################
# NOTICE TO INN MAINTAINERS #
#############################
# This file has been modified from the standard libtool version by adding
# the -B option to request saving of the original file (if install is
-# overwriting an existing file). -B takes an argument, the suffix to use.
-# INN invokes this script as install-sh -B .OLD. Also modified to use
+# overwriting an existing file). -B takes an argument: the suffix to use.
+# INN invokes this script as "install-sh -B .OLD". Also modified to use
# cp -p instead of just cp to install programs when invoked as install -c.
# It also handles .exe extensions, for Cygwin portability, and prevents
# existing directories from being chown'ed.
+# Search for comments below containing "INN".
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -95,6 +96,7 @@
# Desired mode of installed file.
mode=0755
+# INN addition: backupsuffix (for -B).
backupsuffix=
chgrpcmd=
chmodcmd=$chmodprog
@@ -111,6 +113,7 @@
copy_on_change=false
no_target_directory=
+# INN addition: -B SUFFIX, and use -c.
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
@@ -141,11 +144,12 @@
RMPROG STRIPPROG
"
+# INN modification: add -B and do something with -c.
while test $# -ne 0; do
case $1 in
-B) backupsuffix="$2"
shift;;
-
+
-c) cpprog="$cpprog -p";;
-C) copy_on_change=true;;
@@ -172,6 +176,10 @@
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
+ # Protect names problematic for `test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
shift;;
-T) no_target_directory=true;;
@@ -202,6 +210,10 @@
fi
shift # arg
dst_arg=$arg
+ # Protect names problematic for `test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
done
fi
@@ -248,12 +260,12 @@
for src
do
- # Protect names starting with `-'.
+ # Protect names problematic for `test' and other utilities.
case $src in
- -*) src=./$src;;
+ -* | [=\(\)!]) src=./$src;;
esac
- # For Cygwin compatibility (added for INN).
+ # INN addition: Cygwin compatibility.
if [ -x "$src".exe ]; then
src=${src}.exe
fi
@@ -263,7 +275,7 @@
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
- # Don't chown directories that already exist (added for INN).
+ # INN modification: don't chown directories that already exist.
if test $dstdir_status = 0; then
chowncmd=""
fi
@@ -281,12 +293,7 @@
echo "$0: no destination specified." >&2
exit 1
fi
-
dst=$dst_arg
- # Protect names starting with `-'.
- case $dst in
- -*) dst=./$dst;;
- esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
@@ -414,7 +421,7 @@
case $dstdir in
/*) prefix='/';;
- -*) prefix='./';;
+ [-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
@@ -432,7 +439,7 @@
for d
do
- test -z "$d" && continue
+ test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
@@ -508,6 +515,7 @@
then
rm -f "$dsttmp"
else
+ # INN addition: use -B.
# If $backupsuffix is set, rename the existing file if it exists.
if [ x"$backupsuffix" != x ] && [ -f "$dst" ]; then
$doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
More information about the inn-committers
mailing list