automake-patches
[Top][All Lists]
Advanced

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

[PATCH 1/4] {minor} install-sh: assume 'dirname' is available and workin


From: Stefano Lattarini
Subject: [PATCH 1/4] {minor} install-sh: assume 'dirname' is available and working correctly
Date: Fri, 1 Nov 2013 00:09:33 +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 <address@hidden>
Signed-off-by: Stefano Lattarini <address@hidden>
---
 NEWS           |  9 +++++++++
 THANKS         |  1 +
 lib/install-sh | 30 ++----------------------------
 3 files changed, 12 insertions(+), 28 deletions(-)

diff --git a/NEWS b/NEWS
index aaec7c0..50f1e7f 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 6be803e..e4f70f3 100644
--- a/THANKS
+++ b/THANKS
@@ -328,6 +328,7 @@ Phil Edwards                    address@hidden
 Phil Nelson                     address@hidden
 Philip Fong                     address@hidden
 Philip S Tellis                 address@hidden
+Philipp A. Hartmann             address@hidden
 Пухальский Юрий Андреевич       address@hidden
 Quentin Glidic                  address@hidden
 Rainer Orth                     address@hidden
diff --git a/lib/install-sh b/lib/install-sh
index 377bb86..f950f30 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
-- 
1.8.3.1.605.g85318f5




reply via email to

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