make_mirror.sh: also download a foreign architecture

This commit is contained in:
Johannes 'josch' Schauer 2018-10-21 18:02:08 +02:00
parent 7b4d052653
commit 7ca2e490d7
Signed by untrusted user: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -6,7 +6,11 @@ mirrordir="./mirror"
cachedir="./cache"
mirror="http://deb.debian.org/debian"
nativearch=$(dpkg --print-architecture)
arch1=$(dpkg --print-architecture)
arch2=armhf
if [ "$arch1" = "$arch2" ]; then
arch2=amd64
fi
components=main
if [ -e "$mirrordir/dists/unstable/Release" ]; then
@ -24,6 +28,7 @@ for dist in stable testing unstable; do
done
done
for nativearch in $arch1 $arch2; do
for dist in stable testing unstable; do
rootdir=$(mktemp --directory)
@ -33,6 +38,7 @@ for dist in stable testing unstable; do
cat << END > "$rootdir/etc/apt/apt.conf"
Apt::Architecture "$nativearch";
Apt::Architectures "$nativearch";
Dir::Etc "$rootdir/etc/apt";
Dir::State "$rootdir/var/lib/apt";
Dir::Cache "$rootdir/var/cache/apt";
@ -141,3 +147,4 @@ END
rm -r "$rootdir"
done
done