]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
install-sh: assume 'dirname' is available and working correctly
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 30 Oct 2013 22:44:34 +0000 (22:44 +0000)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 30 Oct 2013 22:45:19 +0000 (22:45 +0000)
Really, we no longer care about hosts so outdated/broken to miss
fundamental utilities like basename or dirname.

* lib/install.sh: Adjust.
* NEWS, THANKS: Update.

Suggested-by: Philipp A. Hartmann <philipp.hartmann@offis.de>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
NEWS
THANKS
lib/install-sh

diff --git a/NEWS b/NEWS
index aaec7c0dafd3c0717406ca7294e9933e61eeefcb..50f1e7fe1180ae313bc861490ac3093c10a1a573 100644 (file)
--- a/NEWS
+++ b/NEWS
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+New in 1.15:
+
+* Cleanups and modernizations:
+
+  - The install-sh script now unconditionally assumes that a working
+    'dirname' program is available.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
 New in 1.14.1:
 
 * Bugs fixed:
diff --git a/THANKS b/THANKS
index 6be803e1606c6d4584ea2df508a0e183f9fe4e2a..e4f70f322b966b27473f5850c1e57e8ef22481e9 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -328,6 +328,7 @@ Phil Edwards                    phil@jaj.com
 Phil Nelson                     phil@cs.wwu.edu
 Philip Fong                     pwlfong@users.sourceforge.net
 Philip S Tellis                 philip@ncst.ernet.in
+Philipp A. Hartmann             philipp.hartmann@offis.de
 Пухальский Юрий Андреевич       pooh@cryptopro.ru
 Quentin Glidic                  sardemff7+gnu@sardemff7.net
 Rainer Orth                     ro@techfak.uni-bielefeld.de
index 377bb8687ffe16bfc79ea25c8667cabf72aaf2c2..f950f30c2a92cb9da7dd290de8af14763d424a08 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2011-11-20.07; # UTC
+scriptversion=2013-10-30.23; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -277,33 +277,7 @@ do
       dst=$dstdir/`basename "$src"`
       dstdir_status=0
     else
-      # Prefer dirname, but fall back on a substitute if dirname fails.
-      dstdir=`
-       (dirname "$dst") 2>/dev/null ||
-       expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-            X"$dst" : 'X\(//\)[^/]' \| \
-            X"$dst" : 'X\(//\)$' \| \
-            X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
-       echo X"$dst" |
-           sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-                  s//\1/
-                  q
-                }
-                /^X\(\/\/\)[^/].*/{
-                  s//\1/
-                  q
-                }
-                /^X\(\/\/\)$/{
-                  s//\1/
-                  q
-                }
-                /^X\(\/\).*/{
-                  s//\1/
-                  q
-                }
-                s/.*/./; q'
-      `
-
+      dstdir=`dirname "$dst"`
       test -d "$dstdir"
       dstdir_status=$?
     fi