summaryrefslogtreecommitdiff
path: root/helpers/lh_binary_chroot
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2009-10-16 18:35:28 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:09:47 +0100
commitfa9ebfb6d13d8dfed739dc74ad4c28110a4103f1 (patch)
tree0a01e163ae1c8c026afca02c206fa0ca48968e36 /helpers/lh_binary_chroot
parent4d341dfbb242a4d8a0fbb8de6627fc6fcf738944 (diff)
downloadlive-build-fa9ebfb6d13d8dfed739dc74ad4c28110a4103f1.zip
live-build-fa9ebfb6d13d8dfed739dc74ad4c28110a4103f1.tar.gz
Using pre-cached bootstrap stage, if available, in order to build chroot image which dramatically speads up building of large images.
Diffstat (limited to 'helpers/lh_binary_chroot')
-rwxr-xr-xhelpers/lh_binary_chroot12
1 files changed, 10 insertions, 2 deletions
diff --git a/helpers/lh_binary_chroot b/helpers/lh_binary_chroot
index 1591c25..2023941 100755
--- a/helpers/lh_binary_chroot
+++ b/helpers/lh_binary_chroot
@@ -84,8 +84,16 @@ ${LH_ROOT_COMMAND} rm -rf chroot/chroot
${LH_ROOT_COMMAND} rm -rf chroot.tmp
# Copying new chroot
-${LH_ROOT_COMMAND} cp -a chroot chroot.tmp
-${LH_ROOT_COMMAND} mv chroot.tmp chroot/chroot
+if [ -d cache/stages_bootstrap ]
+then
+ ${LH_ROOT_COMMAND} mv chroot chroot.tmp
+ ${LH_ROOT_COMMAND} cp -a cache/stages_bootstrap chroot
+ ${LH_ROOT_COMMAND} mv chroot.tmp chroot/chroot
+ ${LH_ROOT_COMMAND} touch chroot/chroot.cache
+else
+ ${LH_ROOT_COMMAND} cp -a chroot chroot.tmp
+ ${LH_ROOT_COMMAND} mv chroot.tmp chroot/chroot
+fi
if [ -f config/binary_rootfs/exclude ]
then