install-debian (655B)
1 #!/bin/sh 2 3 set -x -e 4 5 arch="amd64" 6 release="wheezy" 7 root="/ns/debian-$release" 8 test x"$1" != x"" && root="$1" 9 tmpdir="/tmp/debian" 10 mirror="http://ftp.nl.debian.org" 11 12 mkdir -p "$tmpdir" 13 cd "$tmpdir" 14 15 dir="debootstrap-1.0.60~bpo70+1" 16 debootstrap="debootstrap_1.0.60~bpo70+1.tar.gz" 17 if ! test -f "$debootstrap"; then 18 wget "${mirror}/debian/pool/main/d/debootstrap/${debootstrap}" 19 fi 20 if ! test -f "$dir"; then 21 tar -xzf "${debootstrap}" 22 fi 23 24 cd "$dir" 25 26 # create missing devices.tar.gz 27 mkdir -p empty 28 cd empty 29 tar -czf ../devices.tar.gz . 30 cd ../ 31 32 export DEBOOTSTRAP_DIR="$(pwd)" 33 ./debootstrap --arch "$arch" --no-check-gpg "$release" "$root" "$mirror/debian/"