Skip to content

Commit 5ced603

Browse files
author
Ivan Dlugos
committed
download.sh - support multiple arguments (e.g. --install and --sync)
1 parent 346777f commit 5ced603

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

download.sh

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,28 @@ libBuildDir="$(pwd)/lib"
1717
variant=
1818
###
1919

20-
case ${1:-} in
21-
-h|--help)
22-
printHelp=true
23-
;;
24-
--quiet)
25-
quiet=true
20+
while :; do
21+
case ${1:-} in
22+
-h|--help)
23+
printHelp=true
24+
;;
25+
--quiet)
26+
quiet=true
27+
;;
28+
--install)
29+
quiet=true
30+
installLibrary=true
31+
;;
32+
--uninstall)
33+
uninstallLibrary=true
34+
;;
35+
--sync)
36+
variant="sync-"
37+
;;
38+
*) break
39+
esac
2640
shift
27-
;;
28-
--install)
29-
quiet=true
30-
installLibrary=true
31-
shift
32-
;;
33-
--uninstall)
34-
uninstallLibrary=true
35-
shift
36-
;;
37-
--sync)
38-
variant="sync-"
39-
shift
40-
;;
41-
esac
41+
done
4242

4343
tty -s || quiet=true
4444

@@ -103,6 +103,7 @@ function printUsage() {
103103
echo "download.sh [\$1:version] [\$2:os] [\$3:arch]"
104104
echo
105105
echo " Options (use at front only):"
106+
echo " --sync: download ObjectBox Sync variant of the library"
106107
echo " --quiet: skipping asking to install to ${libDirectory}"
107108
echo " --install: install library to ${libDirectory}"
108109
echo " --uninstall: uninstall from ${libDirectory}"

0 commit comments

Comments
 (0)