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