[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/4] {minor} install-sh: assume ${var:-value} works as expected
From: |
Stefano Lattarini |
Subject: |
[PATCH 2/4] {minor} install-sh: assume ${var:-value} works as expected |
Date: |
Fri, 1 Nov 2013 00:09:34 +0000 |
The Autoconf manual says it is OK these days.
* lib/install.sh: Adjust.
* NEWS: Update.
Signed-off-by: Stefano Lattarini <address@hidden>
---
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
- [PATCH] test-driver: optionally run in test directory, Philipp A. Hartmann, 2013/10/25
- Re: [PATCH] test-driver: optionally run in test directory, Stefano Lattarini, 2013/10/28
- Re: [PATCH] test-driver: optionally run in test directory, Philipp A. Hartmann, 2013/10/29
- Re: [PATCH] test-driver: optionally run in test directory, Stefano Lattarini, 2013/10/30
- [PATCH 0/4] {minor} Modernize the install-sh script, Stefano Lattarini, 2013/10/31
- [PATCH 1/4] {minor} install-sh: assume 'dirname' is available and working correctly, Stefano Lattarini, 2013/10/31
- [PATCH 2/4] {minor} install-sh: assume ${var:-value} works as expected,
Stefano Lattarini <=
- [PATCH 3/4] {minor} install-sh: assume that "set -f" and "set +f" work..., Stefano Lattarini, 2013/10/31
- [PATCH 4/4] {minor} cosmetics: untabify the install-sh script, Stefano Lattarini, 2013/10/31