summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2003-06-18 12:22:57 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:10:42 +0200
commitf7a8b957592a5d5649dafd9950ead7ca6b9653ae (patch)
tree2e43a5e142c275548d08b0b77d5d5e8c405c810a /config
parent566b84a737814c3587bb1cb8d64b5814aa9fea78 (diff)
downloadexternal_gettext-f7a8b957592a5d5649dafd9950ead7ca6b9653ae.zip
external_gettext-f7a8b957592a5d5649dafd9950ead7ca6b9653ae.tar.gz
external_gettext-f7a8b957592a5d5649dafd9950ead7ca6b9653ae.tar.bz2
Update install-sh from automake-1.7.5.
Diffstat (limited to 'config')
-rwxr-xr-xconfig/install-sh86
1 files changed, 52 insertions, 34 deletions
diff --git a/config/install-sh b/config/install-sh
index 8dff05b..0ec27bc 100755
--- a/config/install-sh
+++ b/config/install-sh
@@ -1,19 +1,37 @@
#!/bin/sh
#
# install - install a program, script, or datafile
-# This comes from X11R5 (mit/util/scripts/install.sh).
#
-# Copyright 1991 by the Massachusetts Institute of Technology
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission. M.I.T. makes no representations about the
-# suitability of this software for any purpose. It is provided "as is"
-# without express or implied warranty.
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
@@ -55,7 +73,7 @@ dst=""
dir_arg=""
while [ x"$1" != x ]; do
- case "$1" in
+ case $1 in
-c) instcmd=$cpprog
shift
continue;;
@@ -106,10 +124,10 @@ done
if [ x"$src" = x ]
then
- echo "install: no input file specified" >&2
+ echo "$0: no input file specified" >&2
exit 1
else
- true
+ :
fi
if [ x"$dir_arg" != x ]; then
@@ -128,20 +146,20 @@ else
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
- if [ -f "$src" -o -d "$src" ]
+ if [ -f "$src" ] || [ -d "$src" ]
then
- true
+ :
else
- echo "install: $src does not exist" >&2
+ echo "$0: $src does not exist" >&2
exit 1
fi
if [ x"$dst" = x ]
then
- echo "install: no destination specified" >&2
+ echo "$0: no destination specified" >&2
exit 1
else
- true
+ :
fi
# If destination is a directory, append the input filename; if your system
@@ -151,7 +169,7 @@ else
then
dst=$dst/`basename "$src"`
else
- true
+ :
fi
fi
@@ -183,7 +201,7 @@ while [ $# -ne 0 ] ; do
then
$mkdirprog "$pathcomp"
else
- true
+ :
fi
pathcomp=$pathcomp/
@@ -194,10 +212,10 @@ if [ x"$dir_arg" != x ]
then
$doit $instcmd "$dst" &&
- if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else true ; fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else true ; fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else true ; fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else true ; fi
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
else
# If we're going to rename the final executable, determine the name now.
@@ -216,7 +234,7 @@ else
then
dstfile=`basename "$dst"`
else
- true
+ :
fi
# Make a couple of temp file names in the proper directory.
@@ -231,7 +249,7 @@ else
# Move or copy the file name to the temp name
- $doit $instcmd $src "$dsttmp" &&
+ $doit $instcmd "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits
@@ -239,12 +257,12 @@ else
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
- if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp";else true;fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp";else true;fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp";else true;fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp";else true;fi &&
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
-# Now remove or move any old file at destination location. We try this
+# Now remove or move aside any old file at destination location. We try this
# two ways since rm can't unlink itself on some systems and the destination
# file might be busy for other reasons. In this case, the final cleanup
# might fail but the new file should still install successfully.
@@ -255,11 +273,11 @@ else
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
{
- echo "install: cannot unlink or rename $dstdir/$dstfile" >&2
+ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit
}
else
- true
+ :
fi
} &&