From eb76178ab5698dd011ae760cc20ed10c949e6200 Mon Sep 17 00:00:00 2001 From: "Gary.Wzl" Date: Mon, 28 Aug 2017 15:14:54 +0800 Subject: [PATCH] Support to only generate rootfs via variable (GENERATE_ROOTFS_ONLY). --- live-build/auto/build | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/live-build/auto/build b/live-build/auto/build index 978d2fe0..d5b8a87e 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -235,10 +235,16 @@ EOF (cd chroot && find usr/share/doc -maxdepth 1 -type d | xargs du -s | sort -nr) echo END docdirs - lb binary "$@" - touch binary.success + if [ -z "${GENERATE_ROOTFS_ONLY:-}" ]; then + lb binary "$@" + touch binary.success + fi ) 2>&1 | tee binary.log +if [ ! -z "${GENERATE_ROOTFS_ONLY:-}" ] && [ "${GENERATE_ROOTFS_ONLY}" != "false" ]; then + exit 0 +fi + # bash has trouble with the build.sh sourcing arrangement at the top of this # file, so we use this cheap-and-cheerful approach rather than the more # correct 'set -o pipefail'.