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

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

	if [ -n "${LIVE_BOOTSTRAP_CONFIG}" ];
	then
		LIVE_DEBOOTSTRAP_SCRIPT="/usr/lib/debootstrap/scripts/${LIVE_BOOTSTRAP_CONFIG}"
	fi

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

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

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