From 378dc33c8d7b14a5499d486763a9f87c924b3e85 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Adrian=20Schr=C3=B6ter?= Date: Thu, 5 Feb 2009 20:56:04 +0000 Subject: [PATCH] * handle inner return value of VM in case of unchanged build correctly --- build | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build b/build index 7930f5b..1f96421 100755 --- a/build +++ b/build @@ -1065,13 +1065,22 @@ for SPECFILE in "${SPECFILES[@]}" ; do BUILDSTATUS=`dd if="$VM_SWAP" bs=12 count=1 2>/dev/null` case $BUILDSTATUS in BUILDSTATUS0) + # usual successfull build mkdir -p $BUILD_ROOT/.build.packages cd $BUILD_ROOT/.build.packages || cleanup_and_exit 1 echo "build: extracting built packages..." dd if=$VM_SWAP bs=512 skip=1 | cpio --extract --no-absolute-filenames -v cleanup_and_exit 0 ;; - BUILDSTATUS[1-9]) + BUILDSTATUS2) + # successful, but unchanged build, copy back result anyway + mkdir -p $BUILD_ROOT/.build.packages + cd $BUILD_ROOT/.build.packages || cleanup_and_exit 1 + echo "build: extracting built packages..." + dd if=$VM_SWAP bs=512 skip=1 | cpio --extract --no-absolute-filenames -v + cleanup_and_exit 2 + ;; + *) cleanup_and_exit ${BUILDSTATUS#BUILDSTATUS} ;; esac -- 2.7.4