Mercurial > hg > aboriginal
changeset 986:fb0152b485f4
Give bisectinate.sh overrideable SRCDIR and BUILD.
author | Rob Landley <rob@landley.net> |
---|---|
date | Wed, 24 Feb 2010 10:13:36 -0600 |
parents | c7fd7c400d3b |
children | b6d7a815e47a |
files | sources/more/bisectinate.sh |
diffstat | 1 files changed, 19 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/sources/more/bisectinate.sh Wed Feb 24 10:11:02 2010 -0600 +++ b/sources/more/bisectinate.sh Wed Feb 24 10:13:36 2010 -0600 @@ -17,7 +17,9 @@ START="$3" ARCH="$4" -FWLDIR="$(pwd)" +TOP="$(pwd)" +[ -z "$SRCDIR" ] && SRCDIR="$TOP/packages" +[ -z "$BUILD" ] && BUILD="$TOP/build" if [ ! -d "$REPO/.git" ] then @@ -27,14 +29,14 @@ # Start bisecting repository -mkdir -p build/logs +mkdir -p "$BUILD"/logs cd "$REPO" && git clean -fdx && git checkout -f && git bisect reset && git bisect start && git bisect good "$START" || exit 1 RESULT="$(git bisect bad "$BRANCH")" -cd "$FWLDIR" +cd "$TOP" set -o pipefail @@ -49,27 +51,30 @@ [ ! "$(echo "$RESULT" | head -n 1 | grep "^Bisecting:")" ] && exit cd "$REPO" - git show > "$FWLDIR/build/logs/test-${ARCH}.txt" + git show > "$BUILD/logs/test-${ARCH}.txt" + # The "cat" bypasses git's stupid overengineered built-in call to less. + git log HEAD -1 | cat + echo "Testing..." git archive --prefix="$PKG/" HEAD | bzip2 \ - > "$FWLDIR/packages/alt-$PKG-0.tar.bz2" || exit 1 - cd "$FWLDIR" + > "$SRCDIR/alt-$PKG-0.tar.bz2" || exit 1 + cd "$TOP" # Perform actual build RESULT=bad - rm -rf build/*-"$ARCH"{,.tar.bz2} build/cron-temp/"$ARCH"-dropbearmulti + rm -rf "$BUILD"/*-"$ARCH"{,.tar.bz2} "$BUILD"/cron-temp/"$ARCH"-dropbearmulti EXTRACT_ALL=yes USE_UNSTABLE="$PKG" ./build.sh "$ARCH" \ - | tee -a build/logs/test-"$ARCH".txt - if [ -e build/system-image-"$ARCH".tar.bz2 ] + | tee -a "$BUILD"/logs/test-"$ARCH".txt + if [ -e "BUILD"/system-image-"$ARCH".tar.bz2 ] then if [ -z "$LONG" ] then RESULT=good else sources/more/native-static-build.sh "$ARCH" 2>&1 \ - | tee -a build/logs/test-"$ARCH".txt + | tee -a "$BUILD"/logs/test-"$ARCH".txt - [ -e build/cron-temp/"$ARCH"-dropbearmulti ] && RESULT=good + [ -e "$BUILD"/cron-temp/"$ARCH"-dropbearmulti ] && RESULT=good fi fi @@ -77,12 +82,12 @@ if [ "$RESULT" == "bad" ] then - mv build/logs/{test,testfail}-"$ARCH".txt + mv "$BUILD"/logs/{test,testfail}-"$ARCH".txt else - rm build/logs/test-"$ARCH".txt + rm "$BUILD"/logs/test-"$ARCH".txt fi cd "$REPO" RESULT="$(git bisect $RESULT)" - cd "$FWLDIR" + cd "$TOP" done