1
0
mirror of git://git.2f30.org/morpheus.git synced 2024-06-28 22:01:21 +00:00
morpheus/misc/install-debian
Hiltjo Posthuma 5080bfd8b5 misc: add install-debian
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-07-06 18:37:44 +00:00

33 lines
636 B
Bash

#!/bin/sh
set -x -e
arch="amd64"
release="wheezy"
installdir="/ns/debian-$release"
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" "$installdir" "$mirror/debian/"