forked from josch/mmdebstrap
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"
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue