bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gettext install-sh update


From: Paul Eggert
Subject: gettext install-sh update
Date: Tue, 17 Jun 2003 23:20:34 -0700 (PDT)

gettext 0.12.1's install-sh is a bit out of date.  Here is a patch to
upgrade it to Automake 1.7.5 (the latest stable version).  Among other
thing this fixes a POSIX compliance issue (test -o).

--- gettext/config/install-sh   2001-01-05 16:56:08.000000000 -0800
+++ automake/lib/install-sh     2003-05-09 10:22:21.000000000 -0700
@@ -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 @@
 dir_arg=""
 
 while [ x"$1" != x ]; do
-    case "$1" in
+    case $1 in
        -c) instcmd=$cpprog
            shift
            continue;;
@@ -106,10 +124,10 @@
 
 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 @@
 # 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 @@
        then
                dst=$dst/`basename "$src"`
        else
-               true
+               :
        fi
 fi
 
@@ -183,7 +201,7 @@
         then
                $mkdirprog "$pathcomp"
        else
-               true
+               :
        fi
 
        pathcomp=$pathcomp/
@@ -194,10 +212,10 @@
 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 @@
        then
                dstfile=`basename "$dst"`
        else
-               true
+               :
        fi
 
 # Make a couple of temp file names in the proper directory.
@@ -231,7 +249,7 @@
 
 # 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 @@
 # 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 @@
                $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
 } &&
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]