2016-07-04 13:52:19 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-07-04 14:20:42 +02:00
|
|
|
echo $0
|
2016-07-04 13:52:19 +02:00
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
|
|
|
debian_mirror=$1
|
2020-01-14 23:14:45 +01:00
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
2016-07-04 13:52:19 +02:00
|
|
|
|
2016-09-06 14:33:13 +02:00
|
|
|
printf 'APT::Install-Recommends "0";\nAPT::Install-Suggests "0";\n' \
|
|
|
|
> /etc/apt/apt.conf.d/99no-install-recommends
|
|
|
|
|
2016-09-15 11:12:49 +02:00
|
|
|
printf 'APT::Acquire::Retries "20";\n' \
|
|
|
|
> /etc/apt/apt.conf.d/99acquire-retries
|
|
|
|
|
2018-12-08 16:57:01 +01:00
|
|
|
cat <<EOF > /etc/apt/apt.conf.d/99no-auto-updates
|
|
|
|
APT::Periodic::Enable "0";
|
|
|
|
APT::Periodic::Update-Package-Lists "0";
|
|
|
|
APT::Periodic::Unattended-Upgrade "0";
|
|
|
|
EOF
|
2018-01-17 21:04:08 +01:00
|
|
|
|
2018-11-27 18:13:33 +01:00
|
|
|
printf 'APT::Get::Assume-Yes "true";\n' \
|
|
|
|
> /etc/apt/apt.conf.d/99assumeyes
|
2020-01-14 23:14:45 +01:00
|
|
|
|
|
|
|
cat <<EOF > /etc/apt/apt.conf.d/99quiet
|
2020-02-11 12:48:34 +01:00
|
|
|
Dpkg::Use-Pty "0";
|
|
|
|
quiet "1";
|
2020-01-14 23:14:45 +01:00
|
|
|
EOF
|
2018-11-27 18:13:33 +01:00
|
|
|
|
2021-08-23 22:48:14 +02:00
|
|
|
cat <<EOF > /etc/apt/apt.conf.d/99confdef
|
|
|
|
Dpkg::Options { "--force-confdef"; };
|
|
|
|
EOF
|
|
|
|
|
2017-03-16 14:48:08 +01:00
|
|
|
if echo $debian_mirror | grep '^https' 2>&1 > /dev/null; then
|
2018-11-27 18:13:33 +01:00
|
|
|
apt-get update || apt-get update
|
2021-10-17 22:58:12 +02:00
|
|
|
apt-get install ca-certificates
|
2017-03-16 14:48:08 +01:00
|
|
|
fi
|
|
|
|
|
2018-11-27 14:07:19 +01:00
|
|
|
cat << EOF > /etc/apt/sources.list
|
2021-09-03 12:18:13 +02:00
|
|
|
deb ${debian_mirror} bullseye main
|
2022-09-05 18:45:17 +02:00
|
|
|
deb https://security.debian.org/debian-security bullseye-security main
|
2021-09-03 12:18:13 +02:00
|
|
|
deb ${debian_mirror} bullseye-updates main
|
2018-11-27 14:07:19 +01:00
|
|
|
EOF
|
2021-09-03 12:18:13 +02:00
|
|
|
echo "deb ${debian_mirror} bullseye-backports main" > /etc/apt/sources.list.d/backports.list
|
2016-07-04 13:52:19 +02:00
|
|
|
|
2018-11-27 18:13:33 +01:00
|
|
|
apt-get update || apt-get update
|
|
|
|
apt-get upgrade --download-only
|
|
|
|
apt-get upgrade
|
2016-07-04 13:52:19 +02:00
|
|
|
|
2021-08-25 14:51:20 +02:00
|
|
|
# again after upgrade in case of keyring changes
|
|
|
|
apt-get update || apt-get update
|
|
|
|
|
2016-07-04 13:52:19 +02:00
|
|
|
packages="
|
2022-10-11 16:21:59 +02:00
|
|
|
apksigner
|
2021-09-03 13:48:36 +02:00
|
|
|
default-jdk-headless
|
|
|
|
default-jre-headless
|
2022-05-19 15:43:55 +02:00
|
|
|
dexdump
|
2021-09-03 13:48:36 +02:00
|
|
|
fdroidserver
|
2022-10-11 12:09:05 +02:00
|
|
|
git-svn
|
2021-09-03 13:48:36 +02:00
|
|
|
gnupg
|
2022-10-11 12:09:05 +02:00
|
|
|
mercurial
|
2021-10-17 21:47:21 +02:00
|
|
|
patch
|
|
|
|
rsync
|
2022-04-22 10:28:25 +02:00
|
|
|
sdkmanager
|
2020-05-27 17:40:23 +02:00
|
|
|
sudo
|
2016-07-04 13:52:19 +02:00
|
|
|
"
|
2021-09-03 13:48:36 +02:00
|
|
|
|
2018-11-27 18:13:33 +01:00
|
|
|
apt-get install $packages --download-only
|
|
|
|
apt-get install $packages
|
2021-09-03 13:48:36 +02:00
|
|
|
apt-get purge fdroidserver
|
2016-07-04 13:52:19 +02:00
|
|
|
|
|
|
|
highestjava=`update-java-alternatives --list | sort -n | tail -1 | cut -d ' ' -f 1`
|
|
|
|
update-java-alternatives --set $highestjava
|