summaryrefslogtreecommitdiff
path: root/.github/actions/pkginstall/install-apt.sh
blob: d06ee5f4238306e3a35e3aa54f6bc4de6ab33e2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash -x

# If called without arguments, just skip the rest
if [[ -z "$@" ]]; then
	exit
fi

# Don't care about these bits
echo 'path-exclude=/usr/share/doc/*' > /etc/dpkg/dpkg.cfg.d/99-exclude-cruft
echo 'path-exclude=/usr/share/locale/*' >> /etc/dpkg/dpkg.cfg.d/99-exclude-cruft
echo 'path-exclude=/usr/share/man/*' >> /etc/dpkg/dpkg.cfg.d/99-exclude-cruft

# Something about the postgres repo is weird - it randomly returns 404 for the
# Release file and breaks the build
mv /etc/apt/sources.list.d/pgdg.list /etc/apt/sources.list.d/pgdg.list.backup

apt-get update
apt-get install -yq --no-install-suggests --no-install-recommends $@

mv /etc/apt/sources.list.d/pgdg.list.backup /etc/apt/sources.list.d/pgdg.list