Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Adam <dev@robert-adam.de>2020-04-04 19:04:31 +0300
committerRobert Adam <dev@robert-adam.de>2020-04-04 19:04:31 +0300
commit3e0c5065d21dfbd1e56b91f81c28fccdbadad794 (patch)
tree5f709a7e918b36ce8878c74e6339785f62935fa8 /scripts
parent2d93dbec287b622683e160cdaad14484d6897bcb (diff)
scripts/travis-ci/before_install.bash: Check if package is installed before attempting to install using brew
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/travis-ci/before_install.bash13
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/travis-ci/before_install.bash b/scripts/travis-ci/before_install.bash
index a46eb5ded..c5d9f496c 100755
--- a/scripts/travis-ci/before_install.bash
+++ b/scripts/travis-ci/before_install.bash
@@ -76,7 +76,18 @@ elif [ "${TRAVIS_OS_NAME}" == "osx" ]; then
# We don’t use the symlinked "python" installed
# by default in the image, so we unlink it to allow
# the "python@2" package to be installed without conflict.
- brew update && brew unlink python && brew install qt5 libogg libvorbis flac libsndfile protobuf openssl ice
+ brew update && brew unlink python
+
+ # As brew will set a non-zero exit status if one of the packages it is asked to install
+ # is installed already. Thus we have to iterate through every single one and check if it
+ # is installed first.
+ for pkg in qt5 libogg libvorbis flac libsndfile protobuf openssl ice; do
+ if brew ls --versions "$pkg" > /dev/null; then
+ echo "Skipping installation of $pkg as it is already installed"
+ else
+ brew install "$pkg"
+ fi
+ done
else
exit 1
fi