#!/usr/bin/env bash

brew_path=$(which brew)
if [ -x "$brew_path" ] ; then
  echo "Install/Updating Homebrew Packages"
  echo ""
else
  echo "Installing homebrew"
  echo ""
  ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  if [ $? -ne 0 ]; then
    echo "Error installing homebrew. Bailing..."
    echo ""
    exit 1;
  else
    brew doctor
    if [ $? -ne 0 ]; then
      echo "Brew Doctor is not happy. Bailing..."
      echo ""
      exit 1;
    fi
  fi
fi

brew update

brew upgrade

brew install ack
brew install ag
brew install antigen
brew install apple-gcc42
brew install awscli
brew install chruby
brew install coreutils
brew install elixir
brew install erlang
brew install ffmpeg
brew install gdbm
brew install git
brew install gnupg
brew install go
brew install heroku
brew install htop-osx
brew install hub
brew install imagemagick
brew install libffi
brew install libyaml
brew install jq
brew install markdown
brew install mas
brew install maven
brew install mkvtoolnix
brew install n
brew install nmap
brew install ngrok2
brew install nmap
brew install openssl
brew install pandoc
brew install readline
brew install reattach-to-user-namespace
brew install ruby-install
brew install stow
brew install teensy_loader_cli
brew install the_platinum_searcher
brew install the_silver_searcher
brew install tmux
brew install tmuxinator-completion
brew install ttyrec
brew install vim
brew install wallpaper
brew install xz
brew install youtube-dl
brew install zsh

brew install https://raw.github.com/falsecz/homebrew-misc/master/Formula/git-wtf.rb

brew cleanup
