1#!/usr/bin/env bash 2 3set -e -x 4 5# The check_autoconf_regen job of .github/workflows/build.yml must kept in 6# sync with this script. Use the same container image than the job so the job 7# doesn't need to run autoreconf in a container. 8IMAGE="ghcr.io/python/autoconf:2024.10.16.11360930377" 9AUTORECONF="autoreconf -ivf -Werror" 10 11WORK_DIR="/src" 12 13abs_srcdir=$(cd $(dirname $0)/../..; pwd) 14 15if podman --version &>/dev/null; then 16 RUNTIME="podman" 17elif docker --version &>/dev/null; then 18 RUNTIME="docker" 19else 20 echo "$@ needs either Podman or Docker container runtime." >&2 21 exit 1 22fi 23 24PATH_OPT="" 25if command -v selinuxenabled >/dev/null && selinuxenabled; then 26 PATH_OPT=":Z" 27fi 28 29"$RUNTIME" run --rm -v "$abs_srcdir:$WORK_DIR$PATH_OPT" "$IMAGE" 30