1
0
mirror of git://git.2f30.org/morpheus.git synced 2024-06-25 06:48:32 +00:00
morpheus/misc/install-debian

34 lines
655 B
Plaintext
Raw Normal View History

#!/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/"