2014-07-06 18:37:44 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -x -e
|
|
|
|
|
|
|
|
arch="amd64"
|
|
|
|
release="wheezy"
|
2014-07-13 20:51:18 +00:00
|
|
|
root="/ns/debian-$release"
|
|
|
|
test x"$1" != x"" && root="$1"
|
2014-07-06 18:37:44 +00:00
|
|
|
tmpdir="/tmp/debian"
|
|
|
|
mirror="http://ftp.nl.debian.org"
|
|
|
|
|
|
|
|
mkdir -p "$tmpdir"
|
|
|
|
cd "$tmpdir"
|
|
|
|
|
|
|
|
dir="debootstrap-1.0.60~bpo70+1"
|
|
|
|
debootstrap="debootstrap_1.0.60~bpo70+1.tar.gz"
|
|
|
|
if ! test -f "$debootstrap"; then
|
|
|
|
wget "${mirror}/debian/pool/main/d/debootstrap/${debootstrap}"
|
|
|
|
fi
|
|
|
|
if ! test -f "$dir"; then
|
|
|
|
tar -xzf "${debootstrap}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd "$dir"
|
|
|
|
|
|
|
|
# create missing devices.tar.gz
|
|
|
|
mkdir -p empty
|
|
|
|
cd empty
|
|
|
|
tar -czf ../devices.tar.gz .
|
|
|
|
cd ../
|
|
|
|
|
|
|
|
export DEBOOTSTRAP_DIR="$(pwd)"
|
2014-07-13 20:51:18 +00:00
|
|
|
./debootstrap --arch "$arch" --no-check-gpg "$release" "$root" "$mirror/debian/"
|