]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
install-sh: assume ${var:-value} works as expected
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 30 Oct 2013 22:58:16 +0000 (22:58 +0000)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 30 Oct 2013 22:58:16 +0000 (22:58 +0000)
The Autoconf manual says it is OK these days.

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

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
NEWS
lib/install-sh

diff --git a/NEWS b/NEWS
index 50f1e7fe1180ae313bc861490ac3093c10a1a573..37f513bc62a3a79d711b6d8dda42685fddf9cd1d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -108,8 +108,10 @@ New in 1.15:
 
 * Cleanups and modernizations:
 
-  - The install-sh script now unconditionally assumes that a working
-    'dirname' program is available.
+  - The install-sh script has been modernized, and now makes the following
+    assumptions unconditionally:
+    (1) a working 'dirname' program is available;
+    (2) the ${var:-value} shell parameters substitution works;
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
index f950f30c2a92cb9da7dd290de8af14763d424a08..9a7bad82f84b44509e4075f6b74637a6466f4702 100755 (executable)
@@ -45,15 +45,10 @@ nl='
 '
 IFS=" ""       $nl"
 
-# set DOITPROG to echo to test this script
+# Set DOITPROG to "echo" to test this script.
 
-# Don't use :- since 4.3BSD and earlier shells don't like it.
 doit=${DOITPROG-}
-if test -z "$doit"; then
-  doit_exec=exec
-else
-  doit_exec=$doit
-fi
+doit_exec=${doit:-exec}
 
 # Put in absolute file names if you don't have them in your path;
 # or use environment vars.