#!/bin/sh set -x -e arch="amd64" release="wheezy" root="/ns/debian-$release" test x"$1" != x"" && root="$1" 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)" ./debootstrap --arch "$arch" --no-check-gpg "$release" "$root" "$mirror/debian/"