From 8cdbb668339862aa5a0c51fd310606a23f09b124 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Wed, 8 Jun 2011 11:23:40 +0200 Subject: [PATCH] - remove Adrian's BS --- build | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/build b/build index 457fc2a..b160114 100755 --- a/build +++ b/build @@ -267,11 +267,10 @@ cleanup_and_exit () { trap EXIT test -z "$1" && set 0 rm -f $BUILD_ROOT/exit - BS=$1 - if [ $BS -eq 1 -a -x /bin/df ]; then - # okay, it failed, but maybe because of me ? (no disk space) + if test "$1" -eq 1 -a -x /bin/df ; then + # okay, it failed, but maybe because disk space? if df $BUILD_ROOT 2>/dev/null | grep -q "100%"; then - BS=3 + set 3 fi fi if test -n "$RUNNING_IN_VM" ; then @@ -279,7 +278,7 @@ cleanup_and_exit () { cd / if test -n "$VM_SWAP" -a -e "$VM_SWAP" ; then swapoff "$VM_SWAP" 2>/dev/null - echo -n "BUILDSTATUS$BS" >"$VM_SWAP" + echo -n "BUILDSTATUS$1" >"$VM_SWAP" fi exec >&0 2>&0 # so that the logging tee finishes sleep 1 # wait till tee terminates @@ -308,7 +307,7 @@ cleanup_and_exit () { [ -n "$VM_IMAGE" ] && umount $BUILD_ROOT 2>/dev/null || true fi # echo "pid $$ exit $1" - exit $BS + exit $1 } fail_exit() -- 2.7.4