Generalize Debian distro CI packaging
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
2026-05-05 11:54:48 +02:00
parent 6adf479d39
commit 95186bbb94
4 changed files with 178 additions and 12 deletions

View File

@@ -2,15 +2,40 @@
set -euo pipefail
source "$(cd "$(dirname "$0")/.." && pwd)/lib/common.sh"
export DEBIAN_FRONTEND=noninteractive
distribution_id="$(detect_debian_distribution_id)"
distribution_codename="$(detect_debian_distribution)"
refresh_package_indexes=false
log "Bootstrapping APT packages for $distribution_id:$distribution_codename"
printf 'Acquire::http::Proxy "http://cbrapt01.lan.cyber.gent:3142";\n' >/etc/apt/apt.conf.d/80proxy
apt-get update
apt-get upgrade -y
apt-get install -y --no-install-recommends build-essential
apt-get install -y --no-install-recommends software-properties-common
add-apt-repository -y universe
apt-get update
case "$distribution_id" in
ubuntu)
apt-get install -y --no-install-recommends software-properties-common
if ! grep -RqsE '(^|[[:space:]])universe([[:space:]]|$)' /etc/apt/sources.list /etc/apt/sources.list.d 2>/dev/null; then
add-apt-repository -y universe
refresh_package_indexes=true
fi
;;
debian)
;;
*)
die "Unsupported distribution ID: $distribution_id"
;;
esac
if [[ "$refresh_package_indexes" == true ]]; then
apt-get update
fi
apt-get install -y --no-install-recommends \
autoconf \
automake \