forked from osmocom/wireshark
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:
parent
3890d822ba
commit
bd6ee4479f
|
@ -29,6 +29,7 @@ then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ADDITIONAL=0
|
ADDITIONAL=0
|
||||||
|
OPTIONS=
|
||||||
for arg; do
|
for arg; do
|
||||||
case $arg in
|
case $arg in
|
||||||
--install-optional)
|
--install-optional)
|
||||||
|
|
|
@ -34,6 +34,7 @@ fi
|
||||||
ADDITIONAL=0
|
ADDITIONAL=0
|
||||||
TESTDEPS=0
|
TESTDEPS=0
|
||||||
AUR=0
|
AUR=0
|
||||||
|
OPTIONS=
|
||||||
for arg; do
|
for arg; do
|
||||||
case $arg in
|
case $arg in
|
||||||
--install-optional)
|
--install-optional)
|
||||||
|
|
|
@ -30,6 +30,7 @@ then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
OPTIONS=
|
||||||
for op
|
for op
|
||||||
do
|
do
|
||||||
if [ "$op" = "--install-optional" ]
|
if [ "$op" = "--install-optional" ]
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
# that way.
|
# that way.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
set -e -u -o pipefail
|
||||||
|
|
||||||
if [ "$1" = "--help" ]
|
if [ "$1" = "--help" ]
|
||||||
then
|
then
|
||||||
printf "\\nUtility to setup a debian-based system for Wireshark Development.\\n"
|
printf "\\nUtility to setup a debian-based system for Wireshark Development.\\n"
|
||||||
|
@ -33,6 +35,7 @@ fi
|
||||||
ADDITIONAL=0
|
ADDITIONAL=0
|
||||||
DEBDEPS=0
|
DEBDEPS=0
|
||||||
TESTDEPS=0
|
TESTDEPS=0
|
||||||
|
OPTIONS=
|
||||||
for arg; do
|
for arg; do
|
||||||
case $arg in
|
case $arg in
|
||||||
--install-optional)
|
--install-optional)
|
||||||
|
@ -113,7 +116,7 @@ TESTDEPS_LIST=
|
||||||
# Adds package $2 to list variable $1 if the package is found.
|
# Adds package $2 to list variable $1 if the package is found.
|
||||||
# If $3 is given, then this version requirement must be satisfied.
|
# If $3 is given, then this version requirement must be satisfied.
|
||||||
add_package() {
|
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 |
|
version=$(apt-cache show "$pkgname" 2>/dev/null |
|
||||||
awk '/^Version:/{ print $2; exit}')
|
awk '/^Version:/{ print $2; exit}')
|
||||||
|
|
|
@ -27,6 +27,7 @@ fi
|
||||||
ADDITIONAL=0
|
ADDITIONAL=0
|
||||||
TESTDEPS=0
|
TESTDEPS=0
|
||||||
LUA=0
|
LUA=0
|
||||||
|
OPTIONS=
|
||||||
for arg; do
|
for arg; do
|
||||||
case $arg in
|
case $arg in
|
||||||
--install-optional)
|
--install-optional)
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
# that way.
|
# that way.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
set -e -u -o pipefail
|
||||||
|
|
||||||
if [ "$1" = "--help" ]
|
if [ "$1" = "--help" ]
|
||||||
then
|
then
|
||||||
echo "\nUtility to setup a rpm-based system for Wireshark Development.\n"
|
echo "\nUtility to setup a rpm-based system for Wireshark Development.\n"
|
||||||
|
@ -31,6 +33,7 @@ fi
|
||||||
|
|
||||||
ADDITIONAL=0
|
ADDITIONAL=0
|
||||||
RPMDEPS=0
|
RPMDEPS=0
|
||||||
|
OPTIONS=
|
||||||
for arg; do
|
for arg; do
|
||||||
case $arg in
|
case $arg in
|
||||||
--install-optional)
|
--install-optional)
|
||||||
|
|
Loading…
Reference in New Issue