summaryrefslogtreecommitdiff
path: root/infrastructure/setup-debian-chroot.sh
diff options
context:
space:
mode:
Diffstat (limited to 'infrastructure/setup-debian-chroot.sh')
-rwxr-xr-xinfrastructure/setup-debian-chroot.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/infrastructure/setup-debian-chroot.sh b/infrastructure/setup-debian-chroot.sh
new file mode 100755
index 00000000..1e03bd75
--- /dev/null
+++ b/infrastructure/setup-debian-chroot.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -ex
+
+CHROOT_BASE=/var/chroot
+LSB_RELEASE=$(lsb_release -s -c)
+
+apt-get update
+apt-get install -y debootstrap schroot
+
+mkdir -p ${CHROOT_BASE}
+debootstrap --arch=i386 --variant=buildd "${LSB_RELEASE}" "${CHROOT_BASE}/${LSB_RELEASE}-i386" http://deb.debian.org/debian
+cat > /etc/schroot/chroot.d/ci <<EOF
+[${LSB_RELEASE}]
+type=directory
+directory=${CHROOT_BASE}/${LSB_RELEASE}-i386
+personality=linux32
+EOF