79 lines
2.4 KiB

# curl -fsSL | bash -c
echo ""
echo ""
echo "Checking for"
echo ""
echo " * XCode Command Line Tools"
echo " * wget"
echo " * pkg-config"
echo " * node"
echo " * jshint"
echo ""
# XCode
# testing for which git, gcc, etc will not work because the tools are aliased to the install script
if [ -z "$(xcode-select --print-path 2>/dev/null)" ] || [ -z "$(git --version 2>/dev/null)" ]; then
echo "Hey You!!!"
echo ""
echo "A thingy is going to pop up and ask you to install 'command line developer tools' for 'xcode-select'"
echo ""
echo "You need to click Install. This installation should begin when that finishes."
echo "(if that box doesn't pop up in a second or two, something went wrong)"
echo "(note that it may pop up underneath this window, so check for it in the dock too)"
echo ""
xcode-select --install 2>/dev/null
while true; do
sleep 5
if [ -n "$(xcode-select --print-path 2>/dev/null)" ]; then
# Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.
echo "Now running 'sudo xcodebuild -license' so that you can accept the license agreement"
sudo xcodebuild -license
if [ -n "$(git --version 2>/dev/null)" ] && [ -n "$(xcode-select --print-path 2>/dev/null)" ]; then
echo "It looks like the other install is finishing up."
echo "This installation will begin in one minute."
sleep 60
# homebrew
if [ -z "$(which brew | grep brew)" ]; then
echo "installing brew (homebrew)..."
ruby -e "$(curl -fsSL"
brew doctor
echo "updating brew..."
brew update >/dev/null 2>/dev/null
if [ -z "$(which wget | grep wget)" ]; then
echo "installing wget..."
brew install wget
#if [ -z "$(which fail2ban-server | grep fail2ban)" ]; then
# if [ -z "${NO_FAIL2BAN}" ]; then
# brew install fail2ban
# sudo cp -fv /usr/local/opt/fail2ban/*.plist /Library/LaunchDaemons
# sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.fail2ban.plist
# fi
if [ -z "$(which pkg-config | grep pkg-config)" ]; then
echo "installing pkg-config..."
brew install pkg-config