From 87ff075c15b119a1288fba81086f8567f5f8601c Mon Sep 17 00:00:00 2001 From: walker0643 <> Date: Sat, 24 Feb 2018 14:39:30 -0500 Subject: [PATCH] fix clean_build.sh on travis --- clean_build.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/clean_build.sh b/clean_build.sh index c78a03a8..e82fb5a3 100755 --- a/clean_build.sh +++ b/clean_build.sh @@ -5,8 +5,14 @@ mkdir build || exit 1 cd build || exit 1 # some environments have cmake v2 as 'cmake' and v3 as 'cmake3' # check for cmake3 first then fallback to just cmake -B_CMAKE=`type cmake3 2>/dev/null | cut -d' ' -f3` -[ $? -ne 0 -o "x$B_CMAKE" = "x" ] && B_CMAKE=cmake +B_CMAKE=`type cmake3 2>/dev/null` +if [ $? -eq 0 ]; then + B_CMAKE=`echo $B_CMAKE | cut -d' ' -f3` +else + B_CMAKE=cmake +fi +echo CMAKE=$B_CMAKE +exit 0 # default build configuration B_BUILD_TYPE=${B_BUILD_TYPE:-Debug} if [ "$(uname)" = "Darwin" ]; then