summaryrefslogtreecommitdiff
path: root/helpers/lh_debootstrap
blob: 738179bdec0e13b31b747c6b42726b6c53db09f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

if [ ! -f "${LIVE_ROOT}"/.stage/bootstrap ]
then
	# Create chroot directory
	if [ ! -d "${LIVE_CHROOT}" ]
	then
		mkdir -p "${LIVE_CHROOT}"
	fi

	debootstrap --arch="${LIVE_ARCHITECTURE}" --variant=buildd "${LIVE_DISTRIBUTION}" "${LIVE_CHROOT}" "${LIVE_MIRROR}"

	# Touching stage file
	if [ ! -d "${LIVE_ROOT}"/.stage ]
	then
		mkdir "${LIVE_ROOT}"/.stage
	fi

	touch "${LIVE_ROOT}"/.stage/bootstrap
fi