Tweak travis script

Exit if cd fails and don't insert '\' in string.
This commit is contained in:
ShadowNinja 2016-03-19 01:21:58 -04:00
parent 2ce02c99b4
commit eb7db21d50
1 changed files with 8 additions and 7 deletions

View File

@ -2,10 +2,8 @@
if [[ $PLATFORM == "Unix" ]]; then if [[ $PLATFORM == "Unix" ]]; then
mkdir -p travisbuild mkdir -p travisbuild
cd travisbuild cd travisbuild || exit 1
CMAKE_FLAGS='-DCMAKE_BUILD_TYPE=Debug \ CMAKE_FLAGS=''
-DRUN_IN_PLACE=TRUE \
-DENABLE_GETTEXT=TRUE'
# Clang builds with FreeType fail on Travis # Clang builds with FreeType fail on Travis
if [[ $CC == "clang" ]]; then if [[ $CC == "clang" ]]; then
CMAKE_FLAGS+=' -DENABLE_FREETYPE=FALSE' CMAKE_FLAGS+=' -DENABLE_FREETYPE=FALSE'
@ -13,7 +11,10 @@ if [[ $PLATFORM == "Unix" ]]; then
if [[ $TRAVIS_OS_NAME == "osx" ]]; then if [[ $TRAVIS_OS_NAME == "osx" ]]; then
CMAKE_FLAGS+=' -DCUSTOM_GETTEXT_PATH=/usr/local/opt/gettext' CMAKE_FLAGS+=' -DCUSTOM_GETTEXT_PATH=/usr/local/opt/gettext'
fi fi
cmake $CMAKE_FLAGS .. cmake -DCMAKE_BUILD_TYPE=Debug \
-DRUN_IN_PLACE=TRUE \
-DENABLE_GETTEXT=TRUE \
$CMAKE_FLAGS ..
make -j2 make -j2
echo "Running unit tests." echo "Running unit tests."
../bin/minetest --run-unittests && exit 0 ../bin/minetest --run-unittests && exit 0
@ -34,9 +35,9 @@ elif [[ $PLATFORM == Win* ]]; then
export EXISTING_MINETEST_DIR=$OLDDIR export EXISTING_MINETEST_DIR=$OLDDIR
export NO_MINETEST_GAME=1 export NO_MINETEST_GAME=1
if [[ $PLATFORM == "Win32" ]]; then if [[ $PLATFORM == "Win32" ]]; then
$OLDDIR/util/buildbot/buildwin32.sh travisbuild && exit 0 "$OLDDIR/util/buildbot/buildwin32.sh" travisbuild && exit 0
elif [[ $PLATFORM == "Win64" ]]; then elif [[ $PLATFORM == "Win64" ]]; then
$OLDDIR/util/buildbot/buildwin64.sh travisbuild && exit 0 "$OLDDIR/util/buildbot/buildwin64.sh" travisbuild && exit 0
fi fi
else else
echo "Unknown platform \"${PLATFORM}\"." echo "Unknown platform \"${PLATFORM}\"."