Tools: Make the Debian and RPM setup scripts more strict.

We use debian-setup.sh and rpm-setup.sh to build the containers in
https://gitlab.com/wireshark/wireshark-containers/. Make sure they fail
with a nonzero exit status, otherwise we might end up with an invalid
container image.

Make sure OPTIONS is defined in all of the setup scripts that use it.
This commit is contained in:
Gerald Combs 2022-04-10 15:40:36 -07:00
parent 3890d822ba
commit bd6ee4479f
6 changed files with 11 additions and 1 deletions

View File

@ -29,6 +29,7 @@ then
fi
ADDITIONAL=0
OPTIONS=
for arg; do
case $arg in
--install-optional)

View File

@ -34,6 +34,7 @@ fi
ADDITIONAL=0
TESTDEPS=0
AUR=0
OPTIONS=
for arg; do
case $arg in
--install-optional)

View File

@ -30,6 +30,7 @@ then
exit 1
fi
OPTIONS=
for op
do
if [ "$op" = "--install-optional" ]

View File

@ -11,6 +11,8 @@
# that way.
#
set -e -u -o pipefail
if [ "$1" = "--help" ]
then
printf "\\nUtility to setup a debian-based system for Wireshark Development.\\n"
@ -33,6 +35,7 @@ fi
ADDITIONAL=0
DEBDEPS=0
TESTDEPS=0
OPTIONS=
for arg; do
case $arg in
--install-optional)
@ -113,7 +116,7 @@ TESTDEPS_LIST=
# Adds package $2 to list variable $1 if the package is found.
# If $3 is given, then this version requirement must be satisfied.
add_package() {
local list="$1" pkgname="$2" versionreq="$3" version
local list="$1" pkgname="$2" versionreq="${3:-}" version
version=$(apt-cache show "$pkgname" 2>/dev/null |
awk '/^Version:/{ print $2; exit}')

View File

@ -27,6 +27,7 @@ fi
ADDITIONAL=0
TESTDEPS=0
LUA=0
OPTIONS=
for arg; do
case $arg in
--install-optional)

View File

@ -11,6 +11,8 @@
# that way.
#
set -e -u -o pipefail
if [ "$1" = "--help" ]
then
echo "\nUtility to setup a rpm-based system for Wireshark Development.\n"
@ -31,6 +33,7 @@ fi
ADDITIONAL=0
RPMDEPS=0
OPTIONS=
for arg; do
case $arg in
--install-optional)