aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2021-01-21 16:57:15 +0100
committerOliver Smith <osmith@sysmocom.de>2021-01-25 10:27:20 +0100
commit4813fb7fd9587a9c8e816b4afb2d0e86833c08d7 (patch)
tree833431be63ee12444b7284bec4731c0bd43de8a6
parent89c733986ed1578efbf648b7354a0cb735ab5bb7 (diff)
repo-install-test: verify DISTRO argument
Keep list of supported distros in one place in repo-install-test.sh. Related: OS#4969 Change-Id: I1aa2564ff861d81a866302e44a1f99ff876c7b31
-rwxr-xr-xscripts/repo-install-test.sh21
1 files changed, 16 insertions, 5 deletions
diff --git a/scripts/repo-install-test.sh b/scripts/repo-install-test.sh
index 7585509..88253a3 100755
--- a/scripts/repo-install-test.sh
+++ b/scripts/repo-install-test.sh
@@ -8,14 +8,25 @@
# * TESTS: which tests to run (all by default, see below for possible values)
. "$(dirname "$0")/common.sh"
-# Show usage
-if [ "$#" -ne 1 ]; then
+DISTRO="$1"
+DISTROS="
+ centos8
+ debian
+"
+
+check_usage() {
+ local i
+ for i in $DISTROS; do
+ if [ "$DISTRO" = "$i" ]; then
+ return
+ fi
+ done
echo "usage: repo-install-test.sh DISTRO"
- echo "DISTRO: debian or centos8"
+ echo "DISTRO: one of: $DISTROS"
exit 1
-fi
+}
-DISTRO="$1"
+check_usage
docker_images_require "$DISTRO-repo-install-test"
FEED="${FEED:-nightly}"