Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: d068867175
Fetching contributors…

Cannot retrieve contributors at this time

executable file 113 lines (95 sloc) 3.002 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
#!/usr/bin/env bash
#set -x

BREW=/usr/local/bin/brew

if [ ! `which gcc` ] ; then
echo "Please download XCode here:"
echo "\thttps://developer.apple.com/downloads/index.action"
exit 1
fi

if [ ! -d /usr/local/Cellar ] ; then
echo 'creating /usr/local/Cellar'
mkdir -p /usr/local/Cellar
sudo chown `whoami` /usr/local
sudo chown `whoami` /usr/local/etc
sudo chown `whoami` /usr/local/lib
sudo chown `whoami` /usr/local/share/doc
sudo chown `whoami` /usr/local/share/man/*
sudo chown `whoami` /usr/local/Cellar
fi

if [ ! -x $BREW ] ; then
echo 'installing homebrew'
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
echo 'changing xcode path to /'
fi

echo 'updating homebrew'
$BREW update

if [ ! -x /usr/local/bin/git ] ; then
echo 'installing git'
$BREW install git
fi

$BREW doctor
if [ $? -ne 0 ] ; then
echo 'bad doctor'
exit 1
fi

if [ ! -x /usr/local/bin/hg ] ; then
echo 'installing mercurial'
$BREW install mercurial
fi

if [ ! -d /usr/local/Cellar/autoconf ] ; then
echo 'installing autoconf'
$BREW install autoconf
fi

if [ ! -d /usr/local/Cellar/automake ] ; then
echo 'installing automake'
$BREW install automake
fi

if [ ! -x ~/.rvm/bin/rvm ] ; then
echo 'installing rvm'
bash -s master < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
echo '[[ -r $rvm_path/scripts/completion ]] && . $rvm_path/scripts/completion' >> ~/.bash_profile
echo 'source ~/.profile' >> ~/.bash_profile
fi

if [ ! `which ipython` ] ; then
echo 'installing ipython'
sudo easy_install ipython
fi

$BREW install libksba
$BREW install ack
$BREW install wget
$BREW install curl
$BREW install redis
$BREW install memcached
$BREW install libmemcached
$BREW install colordiff
$BREW install nginx
$BREW install sqlite
$BREW install libxml2
$BREW install libxslt
$BREW install v8
$BREW install sphinx
$BREW install xz
$BREW install geoip
$BREW install lzo
$BREW install mysql
$BREW install mongodb
$BREW install readline
$BREW install bash-completion
$BREW install ctags
# breaks some things?
#$BREW link readline

# homebrew's bash completions
ln -s "/usr/local/Library/Contributions/brew_bash_completion.sh" "/usr/local/etc/bash_completion.d"

$BREW install https://raw.github.com/AndrewVos/homebrew-alt/master/duplicates/vim.rb

# Source RVM as a function into local environment.
[ -s "$HOME/.rvm/scripts/rvm" ] && . "$HOME/.rvm/scripts/rvm"

# TODO: short-circuit
$HOME/.rvm/bin/rvm get head
$HOME/.rvm/bin/rvm install 1.9.3-p125 --enable-shared --with-readline-dir=/usr/local
$HOME/.rvm/bin/rvm gemset create
$HOME/.rvm/rubies/ruby-1.9.3-p125/bin/gem install rails bundler unicorn rspec pg
$HOME/.rvm/bin/rvm pkg install readline
$HOME/.rvm/bin/rvm --default use 1.9.3-p125

echo "remember to install DejaVu here:"
echo "\thttp://dejavu-fonts.org/wiki/Download"
Something went wrong with that request. Please try again.