Skip to content

Instantly share code, notes, and snippets.

@idealhack
Created October 10, 2013 15:17
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 idealhack/56025d8de0177375631c to your computer and use it in GitHub Desktop.
Save idealhack/56025d8de0177375631c to your computer and use it in GitHub Desktop.
bootstrap script for ubuntu vagrant box
#!/usr/bin/env bash
PYRQM=/vagrant/requirements.txt
[ -f /etc/apt/sources.list.ori ] || mv /etc/apt/sources.list /etc/apt/sources.list.ori
cat > /etc/apt/sources.list << EOF
deb http://mirrors.163.com/ubuntu/ precise main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
EOF
apt-get update
apt-get install -y vim python-dev python-pip python-bcrypt python-mysqldb
[ -f $PYRQM ] && pip install -r $PYRQM;
echo "cd /vagrant" >> /home/vagrant/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment