diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-10-30 22:44:34 +0000 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-10-30 22:45:19 +0000 |
commit | 1b61da332734264141cb7500ee8c68d0927c72fa (patch) | |
tree | 92b51657b115f965c870cb2d0de268710a26be62 | |
parent | 82216ce83ba3cdf3572b58e4d9e84886ab02d22d (diff) | |
download | automake-1b61da332734264141cb7500ee8c68d0927c72fa.tar.gz |
install-sh: assume 'dirname' is available and working correctly
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>
-rw-r--r-- | NEWS | 9 | ||||
-rw-r--r-- | THANKS | 1 | ||||
-rwxr-xr-x | lib/install-sh | 30 |
3 files changed, 12 insertions, 28 deletions
@@ -104,6 +104,15 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +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: @@ -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 diff --git a/lib/install-sh b/lib/install-sh index 377bb8687..f950f30c2 100755 --- a/lib/install-sh +++ b/lib/install-sh @@ -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 |