- remove Adrian's BS
authorMichael Schroeder <mls@suse.de>
Wed, 8 Jun 2011 09:23:40 +0000 (11:23 +0200)
committerMichael Schroeder <mls@suse.de>
Wed, 8 Jun 2011 09:23:40 +0000 (11:23 +0200)
build

diff --git a/build b/build
index 457fc2a..b160114 100755 (executable)
--- 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()