diff options
author | Dario Lombardo <lomato@gmail.com> | 2019-12-05 19:11:13 +0100 |
---|---|---|
committer | Dario Lombardo <lomato@gmail.com> | 2019-12-06 13:32:47 +0000 |
commit | b11640513957476519c4b0df387f53821a91e866 (patch) | |
tree | 80ffd089014553821e3da01135e1f8049e513340 | |
parent | 9689eea25f98d510423f44d33225fbcd89d77f92 (diff) |
tools: use better operators in package scripts.
Change-Id: I1de75829de5f77fa5fe6c8715b1df76148937bc5
Reviewed-on: https://code.wireshark.org/review/35326
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
-rwxr-xr-x | tools/alpine-setup.sh | 4 | ||||
-rwxr-xr-x | tools/bsd-setup.sh | 6 | ||||
-rwxr-xr-x | tools/debian-setup.sh | 12 | ||||
-rwxr-xr-x | tools/rpm-setup.sh | 4 |
4 files changed, 13 insertions, 13 deletions
diff --git a/tools/alpine-setup.sh b/tools/alpine-setup.sh index 898d96623f..94d27e8437 100755 --- a/tools/alpine-setup.sh +++ b/tools/alpine-setup.sh @@ -94,7 +94,7 @@ add_package() { ACTUAL_LIST=$BASIC_LIST # Now arrange for optional support libraries -if [ $ADDITIONAL != 0 ] +if [ $ADDITIONAL -ne 0 ] then ACTUAL_LIST="$ACTUAL_LIST $ADDITIONAL_LIST" fi @@ -102,7 +102,7 @@ fi apk update || exit 2 apk add $ACTUAL_LIST $OPTIONS || exit 2 -if [ $ADDITIONAL == 0 ] +if [ $ADDITIONAL -eq 0 ] then printf "\n*** Optional packages not installed. Rerun with --install-optional to have them.\n" fi diff --git a/tools/bsd-setup.sh b/tools/bsd-setup.sh index 2ae05493bd..68469a9df9 100755 --- a/tools/bsd-setup.sh +++ b/tools/bsd-setup.sh @@ -156,18 +156,18 @@ esac ACTUAL_LIST=$BASIC_LIST # Now arrange for optional support libraries -if [ $ADDITIONAL != 0 ] +if [ $ADDITIONAL -ne 0 ] then ACTUAL_LIST="$ACTUAL_LIST $ADDITIONAL_LIST" fi $PM $PM_OPTIONS $ACTUAL_LIST $OPTIONS -if [ $? != 0 ] +if [ $? -ne 0 ] then exit 2 fi -if [ $ADDITIONAL == 0 ] +if [ $ADDITIONAL -eq 0 ] then echo -e "\n*** Optional packages not installed. Rerun with --install-optional to have them.\n" fi diff --git a/tools/debian-setup.sh b/tools/debian-setup.sh index abd7288b3b..140d252469 100755 --- a/tools/debian-setup.sh +++ b/tools/debian-setup.sh @@ -170,17 +170,17 @@ fi ACTUAL_LIST=$BASIC_LIST # Now arrange for optional support libraries -if [ $ADDITIONAL != 0 ] +if [ $ADDITIONAL -ne 0 ] then ACTUAL_LIST="$ACTUAL_LIST $ADDITIONAL_LIST" fi -if [ $DEBDEPS != 0 ] +if [ $DEBDEPS -ne 0 ] then ACTUAL_LIST="$ACTUAL_LIST $DEBDEPS_LIST" fi -if [ $TESTDEPS != 0 ] +if [ $TESTDEPS -ne 0 ] then ACTUAL_LIST="$ACTUAL_LIST $TESTDEPS_LIST" fi @@ -188,17 +188,17 @@ fi # shellcheck disable=SC2086 apt-get install $ACTUAL_LIST $OPTIONS || exit 2 -if [ $ADDITIONAL == 0 ] +if [ $ADDITIONAL -eq 0 ] then printf "\n*** Optional packages not installed. Rerun with --install-optional to have them.\n" fi -if [ $DEBDEPS == 0 ] +if [ $DEBDEPS -eq 0 ] then printf "\n*** Debian packages build deps not installed. Rerun with --install-deb-deps to have them.\n" fi -if [ $TESTDEPS == 0 ] +if [ $TESTDEPS -eq 0 ] then printf "\n*** Test deps not installed. Rerun with --install-test-deps to have them.\n" fi diff --git a/tools/rpm-setup.sh b/tools/rpm-setup.sh index 93bf5079c2..c4eff85ca1 100755 --- a/tools/rpm-setup.sh +++ b/tools/rpm-setup.sh @@ -222,7 +222,7 @@ echo "libnl3/libnl are unavailable" >&2 ACTUAL_LIST=$BASIC_LIST # Now arrange for optional support libraries -if [ $ADDITIONAL != 0 ] +if [ $ADDITIONAL -ne 0 ] then ACTUAL_LIST="$ACTUAL_LIST $ADDITIONAL_LIST" fi @@ -230,7 +230,7 @@ fi $PM $PM_OPT install $ACTUAL_LIST $OPTIONS # Now arrange for optional support libraries -if [ $ADDITIONAL == 0 ] +if [ $ADDITIONAL -eq 0 ] then echo -e "\n*** Optional packages not installed. Rerun with --install-optional to have them.\n" fi |