From 42a9b2c087049f158c9f887a2e0950ebb2e717df Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Sun, 31 Jan 2016 00:39:43 +0100 Subject: Initial commit of v2 --- debootstrap.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 debootstrap.sh (limited to 'debootstrap.sh') diff --git a/debootstrap.sh b/debootstrap.sh new file mode 100755 index 0000000..ead947d --- /dev/null +++ b/debootstrap.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +set -e +set -x + +# will use about 2.1 GB +DEBDIR=/tmp/debian-chroot + +RELEASE=stretch +MIRROR=http://httpredir.debian.org/debian/ + +[ -f "build.sh" ] || exit 1 + +if [ $(pgrep -c apt-cacher-ng) -gt 0 ]; then + MIRROR="http://localhost:3142/httpredir.debian.org/debian" +fi + +debootstrap $RELEASE "$DEBDIR" "$MIRROR" +echo "deb-src $MIRROR $RELEASE main" >> "$DEBDIR/etc/apt/sources.list" + +cp -a * "$DEBDIR/usr/src" + +mknod "$DEBDIR/dev/loop0" b 7 0 +chroot "$DEBDIR" /usr/src/build.sh + -- cgit v1.2.3