Skip to content

Instantly share code, notes, and snippets.

@revans
Created July 10, 2013 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save revans/5969579 to your computer and use it in GitHub Desktop.
Save revans/5969579 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -e
# setup colors to indicate good, ok, and bad for test coverage
green="\033[0;32m"
red="\033[0;31m"
reset="\033[0m"
msg() {
echo "${green}\n$1${reset}"
}
fail() {
echo "${red}\n$1${reset}"
}
announce() {
msg "---> $1 ..."
}
run() {
$* || (fail "\nFailed" 1>&2 && exit 1)
}
announce "Installing Homebrew, a good OSX package management system"
run ruby <(curl -fsS https://raw.github.com/mxcl/homebrew/go)
run brew update
if ! grep -qs "recommended by brew doctor" $HOME/.bash_profile; then
announce "Put Homebrew location earlier in the PATH"
run echo "\n# recommended by brew doctor" >> $HOME/.bash_profile
run echo "export PATH='/usr/local/bin:$PATH'\n" >> $HOME/.bash_profile
run source $HOME/.bash_profile
fi
announce "Installing GNU Compiler Collection, a necessary prerequisite to installing Ruby"
run brew tap homebrew/dupes
run brew install apple-gcc42
announce "Installing Postgres, a relational database"
run brew install postgres --no-python
run initdb /usr/local/var/postgres -E utf8
announce "Installing MySQL, another relational database"
run brew install mysql
announce "Installing Redis, a good key-value store database"
run brew install redis
announce "Installing SQLite"
run brew install sqlite
announce "Installing Solr, a good search server"
run brew install solr
announce "Installing Silver Searcher, to search for contents of files"
run brew install ag
announce "Installing ctags, to index files for tab completion methods within text editors"
run brew install ctags
announce "Installing lower level libraries"
run brew install openssl readline libxml2 libyaml librsvg curl wget memcache ack phantomjs ack zlib libiconv
announce "Installing Git, the best version control system"
run brew install git
announce "Installing Nodejs"
run brew install node
announce "Installing ImageMagick"
run brew install imagemagick --use-rsvg
announce "Installing QT, used by Capybara Webkit for headless JavaSCript integration testing"
run brew install qt
announce "Installing watch, to execute a program periodically and show the output"
run brew install watch
# NPM
announce "Installing NPM, a Node Package Manager"
curl https://npmjs.org/install.sh | sh
# Rbenv install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment