Skip to content

Commit

Permalink
travis: add MacOS Bash 3.x workaround to travis-test.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphlange committed Apr 6, 2020
1 parent 25a60b8 commit 4cad610
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions travis-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@
# SET=test00 in .travis.yml runs the tests in this script
# all other jobs are started as compile jobs

# The following if clause can be removed for ci-scripts major version 3
if [ "$TRAVIS_OS_NAME" == osx -a "$BASH_VERSINFO" -lt 4 ]
then
brew install bash
if [ $(/usr/local/bin/bash -c 'echo $BASH_VERSINFO') -lt 4 ]
then
echo "Failed to install a recent bash" >&2
exit 1
fi
exec /usr/local/bin/bash $0 "$@"
fi

# Set VV empty in .travis.yml to make scripts terse
[ "${VV:-1}" ] && set -x

Expand Down

0 comments on commit 4cad610

Please sign in to comment.