make_mirror.sh: also download a foreign architecture
This commit is contained in:
parent
7b4d052653
commit
7ca2e490d7
1 changed files with 98 additions and 91 deletions
|
@ -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,7 +28,8 @@ for dist in stable testing unstable; do
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
for dist in stable testing unstable; do
|
for nativearch in $arch1 $arch2; do
|
||||||
|
for dist in stable testing unstable; do
|
||||||
rootdir=$(mktemp --directory)
|
rootdir=$(mktemp --directory)
|
||||||
|
|
||||||
for p in /etc/apt/apt.conf.d /etc/apt/sources.list.d /etc/apt/preferences.d /var/cache/apt/archives /var/lib/apt/lists/partial /var/lib/dpkg; do
|
for p in /etc/apt/apt.conf.d /etc/apt/sources.list.d /etc/apt/preferences.d /var/cache/apt/archives /var/lib/apt/lists/partial /var/lib/dpkg; do
|
||||||
|
@ -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";
|
||||||
|
@ -140,4 +146,5 @@ END
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -r "$rootdir"
|
rm -r "$rootdir"
|
||||||
|
done
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue