Files
hercules-hyperion/scripts/ci/bootstrap-apt.sh
Yvan Janssens 95186bbb94
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Generalize Debian distro CI packaging
2026-05-05 11:54:48 +02:00

63 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
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
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 \
ca-certificates \
cmake \
curl \
flex \
gawk \
git \
gnupg \
libbz2-dev \
libcap2-bin \
libltdl-dev \
libtool-bin \
m4 \
ncat \
regina-rexx \
reprepro \
sudo \
time \
wget \
zlib1g-dev
update-ca-certificates