summaryrefslogtreecommitdiff
path: root/helpers/lh_bootstrap_cdebootstrap
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:04:49 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:18:29 +0100
commitda353a5231ad925013d01065768864307c70651a (patch)
tree589606906e4e8966797f352ec63162cbb4016da0 /helpers/lh_bootstrap_cdebootstrap
parent068a51b175546dfeac45c747236817cb41db50d7 (diff)
downloadlive-build-da353a5231ad925013d01065768864307c70651a.zip
live-build-da353a5231ad925013d01065768864307c70651a.tar.gz
Adding live-helper 1.0~a4-1.
Diffstat (limited to 'helpers/lh_bootstrap_cdebootstrap')
-rwxr-xr-xhelpers/lh_bootstrap_cdebootstrap44
1 files changed, 44 insertions, 0 deletions
diff --git a/helpers/lh_bootstrap_cdebootstrap b/helpers/lh_bootstrap_cdebootstrap
index b6ea6b9..2430cc8 100755
--- a/helpers/lh_bootstrap_cdebootstrap
+++ b/helpers/lh_bootstrap_cdebootstrap
@@ -25,11 +25,19 @@ Arguments "${@}"
# Ensure that a system is built as root
lh_testroot
+# Starting helper
+Echo_debug "Init ${PROGRAM}"
+
# Reading configuration files
Read_conffile config/common
Read_conffile config/bootstrap
Set_defaults
+if [ "${LH_BOOTSTRAP}" != "cdebootstrap" ]
+then
+ exit 0
+fi
+
# Checking stage file
Check_stagefile .stage/bootstrap
@@ -63,11 +71,36 @@ else
CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --flavour=minimal"
fi
+if [ "${DEBUG}" = "true" ]
+then
+ CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --debug"
+fi
+
+if [ "${QUIET}" = "true" ]
+then
+ CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --quiet"
+fi
+
+if [ "${VERBOSE}" = "true" ]
+then
+ CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --verbose"
+fi
+
if [ -x "/usr/bin/cdebootstrap" ]
then
if [ "${LH_CACHE}" = "enabled" ]
then
# Restore old cache
+ if [ -d cache/chroot_bootstrap ]
+ then
+ cp -a cache/chroot_bootstrap/* chroot
+
+ # Creating stage file
+ Create_stagefile .stage/bootstrap
+
+ exit 0
+ fi
+
if [ -d cache/bootstrap ]
then
mkdir -p chroot/var/cache/bootstrap
@@ -107,6 +140,17 @@ then
rm -rf chroot/var/cache/bootstrap
fi
+ # Saving new cache
+ if [ "${LH_CACHE}" = "enabled" ]
+ then
+ if [ -d cache/chroot_bootstrap ]
+ then
+ rm -rf cache/chroot_bootstrap
+ fi
+
+ cp -a chroot cache/chroot_bootstrap
+ fi
+
# Creating stage file
Create_stagefile .stage/bootstrap
else