1#!/bin/sh 2 3set -e 4 5echo "TRAVIS_OS_NAME=$TRAVIS_OS_NAME" 6 7#if OS is linux or is not set 8if [ "$TRAVIS_OS_NAME" = linux -o -z "$TRAVIS_OS_NAME" ]; then 9 10 wget http://www.cmake.org/files/v3.2/cmake-3.2.3-Linux-x86_64.sh 11 chmod a+x cmake-3.2.3-Linux-x86_64.sh 12 sudo ./cmake-3.2.3-Linux-x86_64.sh --skip-license --prefix=/usr/local 13 export PATH=/usr/local/bin:$PATH 14 15 cmake --version 16 17elif [ "$TRAVIS_OS_NAME" = osx ]; then 18 19 xcode-select --install 20 brew update || echo "suppress failures in order to ignore warnings" 21 brew doctor || echo "suppress failures in order to ignore warnings" 22 brew list cmake || echo "suppress failures in order to ignore warnings" 23 sudo brew uninstall --force cmake || "suppress failures in order to ignore warnings" 24 brew search cmake || echo "suppress failures in order to ignore warnings" 25 brew install cmake || echo "suppress failures in order to ignore warnings" 26 brew upgrade cmake || echo "suppress failures in order to ignore warnings" 27 28 cmake --version 29fi 30 31