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>
This commit is contained in:
parent
9689eea25f
commit
b116405139
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue