33trap ' exit' INT
44
55# Make sure we have the required binaries
6- for NAME in podman docker; do
7- command -v " ${NAME} " & > /dev/null && BINARY= ${NAME}
6+ for name in podman docker; do
7+ command -v " $name " & > /dev/null && binary= $name
88done
9- if [[ -z ${BINARY} ]]; then
9+ if [[ -z $binary ]]; then
1010 echo " Neither podman nor docker could be found on your system! Please install one to use this script."
1111 exit 1
1212fi
3737# Tags such as "latest", "stable", or "rolling" are preferred so that the list
3838# does not have to be constantly updated. Old but supported releases like
3939# Fedora or OpenSUSE are the exception.
40- DOCKER_DISTROS =(
40+ distros =(
4141 archlinux:latest
4242
4343 debian:oldoldstable-slim
@@ -61,21 +61,22 @@ DOCKER_DISTROS=(
6161 ubuntu:devel
6262)
6363
64- BASE=$( dirname " $( readlink -f " ${0} " ) " )
64+ base=$( dirname " $( readlink -f " $0 " ) " )
65+ results=$base /results.log
6566
66- rm " ${BASE} " / results.log
67+ rm " $results "
6768
68- for DISTRO in " ${DOCKER_DISTROS [@]} " ; do
69- DISTRO =docker.io/${DISTRO}
70- " ${BINARY} " pull " ${DISTRO} "
71- " ${BINARY} " run \
69+ for distro in " ${distros [@]} " ; do
70+ distro =docker.io/$distro
71+ " $binary " pull " $distro "
72+ " $binary " run \
7273 --rm \
7374 --init \
74- --volume=" ${BASE} : ${BASE} " \
75- --workdir=" ${BASE} " \
76- " ${DISTRO} " \
77- " ${BASE} " /install-check-clang-version.sh " ${DISTRO} "
75+ --volume=" $base : $base " \
76+ --workdir=" $base " \
77+ " $distro " \
78+ " $base " /install-check-clang-version.sh " $distro "
7879done
7980
8081echo
81- cat " ${BASE} " / results.log
82+ cat " $results "
0 commit comments