From 1b61da332734264141cb7500ee8c68d0927c72fa Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Wed, 30 Oct 2013 22:44:34 +0000 Subject: [PATCH] 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 Signed-off-by: Stefano Lattarini --- NEWS | 9 +++++++++ THANKS | 1 + lib/install-sh | 30 ++---------------------------- 3 files changed, 12 insertions(+), 28 deletions(-) diff --git a/NEWS b/NEWS index aaec7c0da..50f1e7fe1 100644 --- a/NEWS +++ b/NEWS @@ -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: diff --git a/THANKS b/THANKS index 6be803e16..e4f70f322 100644 --- 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 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 -- 2.47.2