Created
March 2, 2012 22:03
-
-
Save erikhazzard/1961702 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
PATH=/usr/sbin:/usr/bin:/sbin:/bin | |
#Must pass in the user (e.g., vagrant) | |
# If no user passed in, assume vagrant | |
if [ -z $1 ] | |
then | |
user_dir='vagrant' | |
else | |
user_dir=$1 | |
fi | |
#---------------------------------------- | |
#Install all the packages | |
#---------------------------------------- | |
sudo apt-get update && sudo apt-get install -y git-core python-pip curl libcurl4-openssl-dev python-dev python-setuptools build-essential libgnutls-dev mongodb g++ curl libssl-dev apache2-utils vim apache2 libapache2-mod-wsgi && sudo apt-get install -y python-software-properties && sudo add-apt-repository ppa:chris-lea/node.js && sudo apt-get update && sudo apt-get install -y nodejs && sudo pip install fabric | |
#NOTE: Installing node requires input from prompt, when runnign this as a setup | |
# script there is not tty interface | |
#sudo mknod -m 644 /dev/tty c 5 0 | |
#sudo chmod a+rw /dev/tty | |
wget http://redis.googlecode.com/files/redis-2.4.7.tar.gz | |
tar xzf redis-2.4.7.tar.gz | |
cd redis-2.4.7 | |
sudo make | |
#---------------------------------------- | |
#Get and install node | |
#---------------------------------------- | |
curl http://npmjs.org/install.sh > install.sh | |
sudo clean=no bash install.sh | |
rm install.sh | |
sudo npm install -g coffee-script | |
#---------------------------------------- | |
#Add db1 alias to /etc/hosts | |
#---------------------------------------- | |
sudo sed -i '1i 127.0.0.1 localhost db1' /etc/hosts | |
#---------------------------------------- | |
#VI Config | |
#---------------------------------------- | |
#CD into the user_dir directory | |
cd /home/$user_dir/ | |
#Make vim directories | |
mkdir -p /home/$user_dir/.vim/colors | |
mkdir -p /home/$user_dir/.vim/syntax | |
mkdir -p /home/$user_dir/.vim/backup | |
mkdir -p /home/$user_dir/.vim/tmp | |
#pathogen | |
mkdir -p /home/$user_dir/.vim/autoload /home/$user_dir/.vim/bundle | |
curl -so /home/$user_dir/.vim/autoload/pathogen.vim https://raw.github.com/tpope/vim-pathogen/HEAD/autoload/pathogen.vim | |
#Get ir_black color scheme | |
wget https://raw.github.com/gist/1725132/a003a53192d15c336bb7dc8ac8dbbc4f6a9f8a5e/ir_black.vim | |
mv ir_black.vim /home/$user_dir/.vim/colors/ir_black.vim | |
#Get vimrc | |
wget https://raw.github.com/gist/1725026/e3bd8be77c9630a560abd2fbf105d07bbc527b4d/.vimrc | |
#---------------------------------------- | |
#Generate SSH Key | |
#---------------------------------------- | |
#make sure nothing is in .ssh | |
sudo -S su - vagrant -c "ssh-keygen -P '' -f /home/$user_dir/.ssh/id_rsa" | |
#---------------------------------------- | |
#Done | |
#---------------------------------------- | |
echo "Done!" | |
#TODO: All that's left is to get the public key and add it to github | |
# It'd be great if we could automate this | |
#---------------------------------------- | |
#TODO: Get output of ssh key | |
#---------------------------------------- | |
#cat /home/$user_dir/.ssh/id_rsa.pub | |
#ADD KEY TO GITHUB | |
#---------------------------------------- | |
#TODO: Checkout repo | |
#---------------------------------------- | |
#sudo mkdir /home/$user_dir/Code/ | |
#cd /home/$user_dir/Code/ | |
#Get repo | |
#git clone [email protected]:visually/Beta.git | |
#CD into Beta | |
#cd Beta | |
#Set everything up | |
#fab initialize |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment