diff options
author | Yann E. MORIN <yann.morin.1998@free.fr> | 2018-04-15 10:55:30 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-04-15 12:07:22 +0200 |
commit | 296381ff4f69715ed880adcce7d5ce608153e767 (patch) | |
tree | d319b6c12db75061422af807b1a2d72788d099fb /applets | |
parent | d4461ef9fb09a48b442c28ddf42314ad146b6e76 (diff) | |
download | busybox-w32-296381ff4f69715ed880adcce7d5ce608153e767.tar.gz busybox-w32-296381ff4f69715ed880adcce7d5ce608153e767.tar.bz2 busybox-w32-296381ff4f69715ed880adcce7d5ce608153e767.zip |
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 <aaro.koskinen@iki.fi>
Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'applets')
-rwxr-xr-x | applets/install.sh | 6 |
1 files changed, 4 insertions, 2 deletions
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 | |||
5 | 5 | ||
6 | prefix=$1 | 6 | prefix=$1 |
7 | if [ -z "$prefix" ]; then | 7 | if [ -z "$prefix" ]; then |
8 | echo "usage: applets/install.sh DESTINATION [--symlinks/--hardlinks/--binaries/--scriptwrapper]" | 8 | echo "usage: applets/install.sh DESTINATION TYPE [OPTS ...]" |
9 | echo " TYPE is one of: --symlinks --hardlinks --binaries --scriptwrapper --none" | ||
10 | echo " OPTS is one or more of: --cleanup --noclobber" | ||
9 | exit 1 | 11 | exit 1 |
10 | fi | 12 | fi |
11 | shift # Keep only remaining options | 13 | shift # Keep only remaining options |
@@ -32,7 +34,7 @@ while [ ${#} -gt 0 ]; do | |||
32 | --sw-sh-sym) scriptwrapper="y"; linkopts="-fs";; | 34 | --sw-sh-sym) scriptwrapper="y"; linkopts="-fs";; |
33 | --cleanup) cleanup="1";; | 35 | --cleanup) cleanup="1";; |
34 | --noclobber) noclobber="1";; | 36 | --noclobber) noclobber="1";; |
35 | "") h="";; | 37 | --none) h="";; |
36 | *) echo "Unknown install option: $1"; exit 1;; | 38 | *) echo "Unknown install option: $1"; exit 1;; |
37 | esac | 39 | esac |
38 | shift | 40 | shift |