continuous-build.sh: better cleanup function
This commit is contained in:
parent
c577fffb34
commit
f2443751aa
|
@ -7,10 +7,13 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
function finish {
|
function finish {
|
||||||
|
if [ "$TRAVIS_BUILD_DIR" != "" ]; then
|
||||||
# ensure that we preserve the toolchain on broken build/test
|
# ensure that we preserve the toolchain on broken build/test
|
||||||
if [ -f "$JEHANNE/hacking/cross/toolchain/bin/x86_64-jehanne-gcc" ]; then
|
if [ -f "$JEHANNE/hacking/cross/toolchain/bin/x86_64-jehanne-gcc" ]; then
|
||||||
mv $JEHANNE/hacking/cross/toolchain/* $JEHANNE/tmp/toolchain/
|
mv $JEHANNE/hacking/cross/toolchain/* $JEHANNE/tmp/toolchain/
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
(cd $JEHANNE/hacking; git clean -xdf disk-setup/; git checkout disk-setup/syslinux.cfg)
|
||||||
}
|
}
|
||||||
trap finish EXIT
|
trap finish EXIT
|
||||||
|
|
||||||
|
@ -33,7 +36,7 @@ if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then
|
||||||
mv $JEHANNE/tmp/toolchain/* $JEHANNE/hacking/cross/toolchain/
|
mv $JEHANNE/tmp/toolchain/* $JEHANNE/hacking/cross/toolchain/
|
||||||
else
|
else
|
||||||
echo "Creating cross-compiling toolchain..."
|
echo "Creating cross-compiling toolchain..."
|
||||||
(cd $JEHANNE/hacking/cross/; ./init.sh)
|
(cd $JEHANNE/hacking/cross/; ./init.sh; git clean -xdf $JEHANNE/hacking/cross/tmp $JEHANNE/hacking/cross/src/)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue