This repository has been archived on 2024-12-14. You can view files and clone it, but cannot push or open issues or pull requests.
2023-01-28 00:05:03 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e;
|
|
|
|
|
|
|
|
ARCH=$(uname -m)
|
|
|
|
|
|
|
|
cp /config/toolchain/* /etc/apt/
|
|
|
|
|
2023-02-28 18:33:59 +00:00
|
|
|
apt-get update -o Acquire::Check-Valid-Until=false
|
2023-01-28 00:05:03 +00:00
|
|
|
apt-get install debian-archive-keyring
|
|
|
|
|
2023-02-28 18:33:59 +00:00
|
|
|
until apt-get install \
|
|
|
|
--download-only \
|
|
|
|
--reinstall \
|
|
|
|
--allow-downgrades \
|
|
|
|
-o Acquire::Check-Valid-Until=false \
|
|
|
|
-y $(cat /etc/apt/packages-${ARCH}.list);
|
|
|
|
do
|
2023-01-28 00:05:03 +00:00
|
|
|
echo "apt install failed. Likely throttled. Retrying in 10 mins...";
|
|
|
|
sleep 600;
|
|
|
|
done;
|
|
|
|
|
|
|
|
(
|
|
|
|
cd /var/cache/apt/archives \
|
|
|
|
&& find . -type f \( -iname \*.deb \) -exec sha256sum {} \; \
|
|
|
|
| sed 's/.\///g' \
|
|
|
|
| LC_ALL=C sort
|
|
|
|
) > /etc/apt/package-hashes-${ARCH}-compare.txt
|
|
|
|
|
|
|
|
diff /etc/apt/package-hashes-${ARCH}{,-compare}.txt
|
|
|
|
|
2023-02-28 18:33:59 +00:00
|
|
|
apt-get install \
|
|
|
|
--allow-downgrades \
|
|
|
|
-y $(cat /etc/apt/packages-${ARCH}.list)
|
2023-01-28 00:05:03 +00:00
|
|
|
rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/* /tmp/* /var/tmp/*;
|