mirror of
https://github.com/Llewellynvdm/php-ml.git
synced 2024-11-11 16:15:50 +00:00
a11e3f69c3
* Add support for coveralls.io
* Generate coverage report only on php 7.2 build
* Fix osx travis build and move tools to bin dir
* Update php version badge
* Fix travis conditional statement
* Fix travis conditional statement
* 🤦 fix bin path
31 lines
663 B
Bash
31 lines
663 B
Bash
#!/usr/bin/env bash
|
|
|
|
if [[ "$#" -eq 1 ]]; then
|
|
echo "Handling \"$1\" brew package..."
|
|
else
|
|
echo "Brew failed - invalid $0 call"
|
|
exit 1;
|
|
fi
|
|
|
|
if [[ $(brew ls --versions "$1") ]]; then
|
|
if brew outdated "$1"; then
|
|
echo "Package upgrade is not required, skipping"
|
|
else
|
|
echo "Updating package...";
|
|
brew upgrade "$1"
|
|
if [ $? -ne 0 ]; then
|
|
echo "Upgrade failed"
|
|
exit 1
|
|
fi
|
|
fi
|
|
else
|
|
echo "Package not available - installing..."
|
|
brew install "$1"
|
|
if [ $? -ne 0 ]; then
|
|
echo "Install failed"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
echo "Linking installed package..."
|
|
brew link "$1" |