only brew if not already installed
Sometimes brew only warns, but other times it errors if you're installing something that is already installed, so lets be safe and only brew if its not already installed
This commit is contained in:
parent
62c1bcb345
commit
134a1f48f9
1 changed files with 12 additions and 8 deletions
|
@ -166,16 +166,20 @@ function cleanup() {
|
||||||
exit $rv
|
exit $rv
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function brew_if_not_installed() {
|
||||||
|
if ! brew ls | grep $1 --quiet; then
|
||||||
|
brew install $1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function install_brew_packages() {
|
function install_brew_packages() {
|
||||||
brew update > /dev/null
|
brew update > /dev/null
|
||||||
brew install autoconf
|
brew_if_not_installed autoconf
|
||||||
brew install automake
|
brew_if_not_installed automake
|
||||||
brew install libtool
|
brew_if_not_installed libtool
|
||||||
brew install pkg-config
|
brew_if_not_installed pkg-config
|
||||||
brew install protobuf
|
brew_if_not_installed protobuf
|
||||||
if ! brew ls | grep gmp --quiet; then
|
brew_if_not_installed gmp
|
||||||
brew install gmp
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_apt_packages() {
|
function install_apt_packages() {
|
||||||
|
|
Loading…
Reference in a new issue