Skip to content

Commit 52ac5ef

Browse files
committed
Fix "brew install gcc" failures on macOS
(I hope)
1 parent 3eba3b6 commit 52ac5ef

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.travis.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ before_install:
102102
set -o errexit
103103
if [[ (-n ${TRAVIS_TAG}) && (${TRAVIS_OS_NAME} == osx) ]] && ${TRAVIS_SECURE_ENV_VARS} ; then
104104
brew update > /dev/null
105-
[[ "$(brew ls --versions gpg2)" ]] || brew install gpg2
105+
brew ls --versions gpg2 >/dev/null || brew install gpg2
106106
brew outdated gpg2 || brew upgrade gpg2
107107
type -P openssl || brew install openssl
108108
fi
@@ -137,10 +137,10 @@ install:
137137
if [[ (-n ${TRAVIS}) && (${TRAVIS_OS_NAME} == osx) ]]; then
138138
brew update > /dev/null
139139
140-
[[ "$(brew ls --versions shellcheck)" ]] || brew install --force-bottle shellcheck
140+
brew ls --versions shellcheck >/dev/null || brew install --force-bottle shellcheck
141141
brew outdated shellcheck || brew upgrade --force-bottle shellcheck
142142
for pkg in ${OSX_PACKAGES}; do
143-
[[ "$(brew ls --versions ${pkg})" ]] || brew install ${pkg}
143+
brew ls --versions ${pkg} >/dev/null || brew install ${pkg} || brew link --overwrite ${pkg}
144144
brew outdated ${pkg} || brew upgrade ${pkg}
145145
done
146146
if [[ ${BUILD_TYPE} == InstallScript ]]; then # uninstall some stuff if present
@@ -150,9 +150,7 @@ install:
150150
else
151151
wget "${!MPICH_BOT_URL_HEAD}${MPICH_BOT_URL_TAIL}"
152152
brew install --force-bottle ${MPICH_BOT_URL_TAIL}
153-
if ! [[ "$(brew ls --versions mpich)" ]]; then
154-
brew install --force-bottle mpich
155-
fi
153+
brew ls --versions mpich >/dev/null || brew install --force-bottle mpich
156154
fi
157155
mpif90 --version || mpif90 -show || true
158156
mpicc --version || mpicc -show || true

0 commit comments

Comments
 (0)