2013-12-16 21:53:21 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2014-03-22 18:02:28 +01:00
|
|
|
function check_for_bug_1242300()
|
|
|
|
{
|
2014-04-06 15:58:15 +02:00
|
|
|
if [ -e /etc/issue ]; then
|
|
|
|
if [ "`grep -i ubuntu.13.10 /etc/issue`" ]; then
|
|
|
|
echo "Ubuntu 13.10 detected. if there was a 'configure:' error"
|
|
|
|
echo "please see https://bugs.launchpad.net/ubuntu/+source/llvm-defaults/+bug/1242300"
|
2014-03-22 18:02:28 +01:00
|
|
|
fi
|
2014-04-06 15:58:15 +02:00
|
|
|
fi
|
2014-03-22 18:02:28 +01:00
|
|
|
}
|
|
|
|
|
2013-12-16 21:53:21 +01:00
|
|
|
function _exit()
|
|
|
|
{
|
2014-04-06 15:58:15 +02:00
|
|
|
EC=$?
|
|
|
|
if [ $EC -ne 0 ]; then
|
|
|
|
test -z "$SCRIPT" && SCRIPT=`basename $0`
|
|
|
|
echo ""
|
|
|
|
echo "exiting with abnormal exit code ($EC)"
|
|
|
|
test -n "$OCDEBUG" || echo "run 'OCDEBUG=1 ./$SCRIPT' to enable debug messages"
|
2019-06-01 19:57:44 +02:00
|
|
|
if [ -n "$CURRENT_BUILD_PROJECT_NAME" ]; then
|
|
|
|
## Build failed. Rebuild everything ##
|
|
|
|
rm -f "build/*_built_successfully"
|
|
|
|
fi
|
2014-04-06 15:58:15 +02:00
|
|
|
echo ""
|
|
|
|
test $SCRIPT = "build.sh" && check_for_bug_1242300
|
|
|
|
fi
|
2013-12-16 21:53:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
trap _exit EXIT
|