[PATCH 2/4] {minor} install-sh: assume ${var:-value} works as expected

Stefano Lattarini <[email protected]>
Newsgroups gmane.comp.sysutils.automake.patches
Message-ID <bd44db1abdeea3643ba0387de24af7539da644e4.1383264207.git.stefano.lattarini@gmail.com>
The Autoconf manual says it is OK these days.

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

Signed-off-by: Stefano Lattarini <[email protected]>
---
 NEWS           | 6 ++++--
 lib/install-sh | 9 ++-------
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/NEWS b/NEWS
index 50f1e7f..37f513b 100644
--- 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;
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
diff --git a/lib/install-sh b/lib/install-sh
index f950f30..9a7bad8 100755
--- a/lib/install-sh
+++ b/lib/install-sh
@@ -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.
-- 
1.8.3.1.605.g85318f5
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.