Ignore:
Timestamp:
May 3, 2009, 8:16:27 PM (12 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
de9edab
Parents:
120f16d
Message:
locker-build: Two small fixes

First, correctly propagate errors out of the subshell that we do the
build in. Second, if a dry-run build fails, drop to a shell anyways to
let me inspect what went wrong.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/locker-build

    r56e4869 r67dd774  
    1414
    1515die() {
    16       echo "$@" 2>&1;
    17       exit 1;
     16    echo "$@" 2>&1;
     17    if [ -n "$TMPDIR" ]; then
     18        if [ -n "$DRYRUN" ]; then
     19            echo "Dropping to a shell to investigate...";
     20            $SHELL
     21        fi
     22    fi
     23    exit 1;
    1824}
    1925
     
    7076exittrap() { rm -rf "$TMPDIR"; }
    7177
    72 $TAR -C "$TMPDIR" -xzvf "$SRC_TGZ" || die "Unable to untar"
     78$TAR -C "$TMPDIR" -xzf "$SRC_TGZ" || die "Unable to untar"
    7379
    7480(
     
    107113)
    108114
     115if [ "$?" -ne 0 ]; then
     116    exit "$?"
     117fi
     118
    109119if [ -n "$OUT_TGZ" ]; then
    110120    $TAR -C "$TMPDIR/"*/tgz -czvf "$OUT_TGZ" . || die "Make tarball failed"
Note: See TracChangeset for help on using the changeset viewer.