From bd44db1abdeea3643ba0387de24af7539da644e4 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Wed, 30 Oct 2013 22:58:16 +0000 Subject: [PATCH] install-sh: assume ${var:-value} works as expected The Autoconf manual says it is OK these days. * lib/install.sh: Adjust. * NEWS: Update. Signed-off-by: Stefano Lattarini --- NEWS | 6 ++++-- lib/install-sh | 9 ++------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index 50f1e7fe1..37f513bc6 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 f950f30c2..9a7bad82f 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. -- 2.47.2