# Quick fix to get manta installed on default vagrant box, longterm solution we should fix the issue 16

apt-get -y install wget
wget -O- http://aptly-mirror-6db0a8.sfo01.justin.tv/internal/twitch.gpg | apt-key add -
echo "deb [arch=amd64] http://aptly-mirror-6db0a8.sfo01.justin.tv/internal/twitch precise main" > /etc/apt/sources.list.d/twitch.list

# build tools

apt-get update
apt-get install -y manta

# go
wget -cq https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz
echo "5020af94b52b65cc9b6f11d50a67e4bae07b0aff  go1.4.2.linux-amd64.tar.gz" | sha1sum --check
tar -C /usr/local -xzf go1.4.2.linux-amd64.tar.gz

mkdir -p /go/src/code.justin.tv/release

echo '# set PATH to include Go if it exists
if [ -d "/usr/local/go" ] ; then
    export PATH="/usr/local/go/bin:/go/bin/:$PATH"
    export GOPATH="/go"
fi
' >> /home/vagrant/.profile

source /home/vagrant/.profile

apt-get -y install git mercurial bzr
go get github.com/golang/lint/golint
go get code.google.com/p/go.tools/cmd/goimports
go get github.com/tools/godep

chown -R vagrant:vagrant /go

# bower

apt-get install -y python-software-properties python g++ make
add-apt-repository ppa:chris-lea/node.js
apt-get update
apt-get install -y nodejs
npm install -g bower
