From 296381ff4f69715ed880adcce7d5ce608153e767 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Sun, 15 Apr 2018 10:55:30 +0200 Subject: applets/install: don't try to install nothing Commit 952d5a6024e7 (applets/install: accept more than one install option) changed the way we handle install options: before that commit, a missing install type would mean to install nothing; after, we would iterate over options, so we would never notice there was a mising option. Fix that by introducing an explicit --none option to specify to install nothing. Reported-by: Aaro Koskinen Cc: Aaro Koskinen Cc: Denys Vlasenko Signed-off-by: Yann E. MORIN Signed-off-by: Denys Vlasenko --- applets/install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'applets') diff --git a/applets/install.sh b/applets/install.sh index c75a78e9d..9aede0f53 100755 --- a/applets/install.sh +++ b/applets/install.sh @@ -5,7 +5,9 @@ export LC_CTYPE=POSIX prefix=$1 if [ -z "$prefix" ]; then - echo "usage: applets/install.sh DESTINATION [--symlinks/--hardlinks/--binaries/--scriptwrapper]" + echo "usage: applets/install.sh DESTINATION TYPE [OPTS ...]" + echo " TYPE is one of: --symlinks --hardlinks --binaries --scriptwrapper --none" + echo " OPTS is one or more of: --cleanup --noclobber" exit 1 fi shift # Keep only remaining options @@ -32,7 +34,7 @@ while [ ${#} -gt 0 ]; do --sw-sh-sym) scriptwrapper="y"; linkopts="-fs";; --cleanup) cleanup="1";; --noclobber) noclobber="1";; - "") h="";; + --none) h="";; *) echo "Unknown install option: $1"; exit 1;; esac shift -- cgit v1.2.3