diff options
author | Daniel Baumann <daniel@debian.org> | 2009-10-16 18:35:28 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:09:47 +0100 |
commit | fa9ebfb6d13d8dfed739dc74ad4c28110a4103f1 (patch) | |
tree | 0a01e163ae1c8c026afca02c206fa0ca48968e36 /helpers/lh_binary_chroot | |
parent | 4d341dfbb242a4d8a0fbb8de6627fc6fcf738944 (diff) | |
download | vyos-live-build-fa9ebfb6d13d8dfed739dc74ad4c28110a4103f1.tar.gz vyos-live-build-fa9ebfb6d13d8dfed739dc74ad4c28110a4103f1.zip |
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-x | helpers/lh_binary_chroot | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/helpers/lh_binary_chroot b/helpers/lh_binary_chroot index 1591c2518..20239419a 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 |