Merge pull request #1527 from 0xmachos/master

Add install_mac logic
This commit is contained in:
Brendan Coles
2018-03-25 22:42:12 +11:00
committed by GitHub

27
install
View File

@@ -17,7 +17,7 @@ RUBYSUFFIX=''
command_exists () {
command -v "$1" /dev/null 2&>/dev/null
command -v "${1}" >/dev/null 2>&1
}
@@ -115,8 +115,29 @@ install_freebsd () {
}
install_mac () {
# brew install ...
echo
local mac_deps=(curl git nodejs python3 \
openssl readline libyaml sqlite3 libxml2 \
autoconf ncurses automake libtool \
bison wget)
if ! command_exists brew; then
fatal "Homebrew (https://brew.sh/) required to install dependencies"
fi
info "Installing dependencies via brew"
brew update
for package in "${mac_deps[@]}"; do
if brew install "${package}"; then
info "${package} installed"
else
fatal "Failed to install ${package}"
fi
done
}