diff options
author | Yann E. MORIN <yann.morin.1998@free.fr> | 2017-12-28 23:49:48 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-01-04 14:43:46 +0100 |
commit | 952d5a6024e7b2a6d5a351a8d1329bd985da3c76 (patch) | |
tree | 1f94c51d3ea2a212d7e4fc7b50869950fbf3b5f5 | |
parent | 84be5ce0d814780918771727e494fe4a2eb46636 (diff) | |
download | busybox-w32-952d5a6024e7b2a6d5a351a8d1329bd985da3c76.tar.gz busybox-w32-952d5a6024e7b2a6d5a351a8d1329bd985da3c76.tar.bz2 busybox-w32-952d5a6024e7b2a6d5a351a8d1329bd985da3c76.zip |
applets/install: accept more than one install option
Currently, it is impossible to pass more than one option to the isntall
script, so it totally prevents using --noclobber.
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rwxr-xr-x | applets/install.sh | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/applets/install.sh b/applets/install.sh index 4b70df96e..ae99381d7 100755 --- a/applets/install.sh +++ b/applets/install.sh | |||
@@ -8,6 +8,7 @@ if [ -z "$prefix" ]; then | |||
8 | echo "usage: applets/install.sh DESTINATION [--symlinks/--hardlinks/--binaries/--scriptwrapper]" | 8 | echo "usage: applets/install.sh DESTINATION [--symlinks/--hardlinks/--binaries/--scriptwrapper]" |
9 | exit 1 | 9 | exit 1 |
10 | fi | 10 | fi |
11 | shift # Keep only remaining options | ||
11 | 12 | ||
12 | # Source the configuration | 13 | # Source the configuration |
13 | . ./.config | 14 | . ./.config |
@@ -21,18 +22,21 @@ scriptwrapper="n" | |||
21 | binaries="n" | 22 | binaries="n" |
22 | cleanup="0" | 23 | cleanup="0" |
23 | noclobber="0" | 24 | noclobber="0" |
24 | case "$2" in | 25 | while [ ${#} -gt 0 ]; do |
25 | --hardlinks) linkopts="-f";; | 26 | case "$1" in |
26 | --symlinks) linkopts="-fs";; | 27 | --hardlinks) linkopts="-f";; |
27 | --binaries) binaries="y";; | 28 | --symlinks) linkopts="-fs";; |
28 | --scriptwrapper) scriptwrapper="y";swrapall="y";; | 29 | --binaries) binaries="y";; |
29 | --sw-sh-hard) scriptwrapper="y";linkopts="-f";; | 30 | --scriptwrapper) scriptwrapper="y"; swrapall="y";; |
30 | --sw-sh-sym) scriptwrapper="y";linkopts="-fs";; | 31 | --sw-sh-hard) scriptwrapper="y"; linkopts="-f";; |
31 | --cleanup) cleanup="1";; | 32 | --sw-sh-sym) scriptwrapper="y"; linkopts="-fs";; |
32 | --noclobber) noclobber="1";; | 33 | --cleanup) cleanup="1";; |
33 | "") h="";; | 34 | --noclobber) noclobber="1";; |
34 | *) echo "Unknown install option: $2"; exit 1;; | 35 | "") h="";; |
35 | esac | 36 | *) echo "Unknown install option: $1"; exit 1;; |
37 | esac | ||
38 | shift | ||
39 | done | ||
36 | 40 | ||
37 | if [ -n "$DO_INSTALL_LIBS" ] && [ "$DO_INSTALL_LIBS" != "n" ]; then | 41 | if [ -n "$DO_INSTALL_LIBS" ] && [ "$DO_INSTALL_LIBS" != "n" ]; then |
38 | # get the target dir for the libs | 42 | # get the target dir for the libs |