Last active
November 15, 2017 01:19
-
-
Save dannygsmith/823fd16a9c5245fdcca50f68bacc5915 to your computer and use it in GitHub Desktop.
Install brew, xcode, and git if any are missing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#styles | |
VP_NONE='\033[00m' | |
VP_RED='\033[01;31m' | |
VP_GREEN='\033[01;32m' | |
VP_YELLOW='\033[01;33m' | |
VP_PURPLE='\033[01;35m' | |
VP_CYAN='\033[01;36m' | |
VP_WHITE='\033[01;37m' | |
VP_BOLD='\033[1m' | |
# install xcode-command line tools | |
# You will need to answer yes to the prompts to continue | |
xcode-select --install | |
# update Homebrew if present, otherwise install | |
which -s brew | |
if [[ $? != 0 ]] ; then | |
# Install Homebrew | |
echo -e "${VP_GREEN}Installing brew${VP_NONE}" | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
else | |
# upgrade homebrew formulas | |
echo -e "${VP_GREEN}Updating brew${VP_NONE}" | |
brew update | |
brew upgrade | |
# cleanup mess | |
brew doctor | |
brew cleanup | |
brew prune | |
fi | |
# check to see if expect is installed | |
which -s expect | |
if [[ $? != 0 ]] ; then | |
#install expect | |
brew install expect | |
elese | |
echo -e "${VP_GREEN}Expect was already installed${VP_NONE}" | |
fi | |
# Now we are going to install a new copy of get | |
echo -e "${VP_GREEN}Installing git${VP_NONE}" | |
brew install git | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment