Skip to content
Permalink
Browse files

Tweak travis script

Exit if cd fails and don't insert '\' in string.
  • Loading branch information
ShadowNinja committed Mar 19, 2016
1 parent 2ce02c9 commit eb7db21d50f866d1e847d7556f83995294a7e54f
Showing with 8 additions and 7 deletions.
  1. +8 −7 util/travis/script.sh
@@ -2,18 +2,19 @@

if [[ $PLATFORM == "Unix" ]]; then
mkdir -p travisbuild
cd travisbuild
CMAKE_FLAGS='-DCMAKE_BUILD_TYPE=Debug \
-DRUN_IN_PLACE=TRUE \
-DENABLE_GETTEXT=TRUE'
cd travisbuild || exit 1

This comment has been minimized.

Copy link
@sfan5

sfan5 Mar 20, 2016

Member

the || exit 1 has no effect when the script is run with /bin/bash -e

This comment has been minimized.

Copy link
@ShadowNinja

ShadowNinja Mar 20, 2016

Author Member

I suppose you're right. I didn't realize that was short for set -e.

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

0 comments on commit eb7db21

Please sign in to comment.
You can’t perform that action at this time.