forked from shuhaowu/trafficcop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
29 lines (23 loc) · 978 Bytes
/
Vagrantfile
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provision "shell", inline: <<-SHELL
sudo apt-get install -y subversion build-essential libncurses5-dev zlib1g-dev gawk git ccache gettext libssl-dev xsltproc git
echo "Add github.com to known_hosts"
mkdir -p /root/.ssh
if [ ! -f /root/.ssh/known_hosts ]; then
touch /root/.ssh/known_hosts && ssh-keyscan -H github.com >> /root/.ssh/known_hosts && chmod 600 /root/.ssh/known_hosts
fi
pushd /home/vagrant
echo "export TRAFFIC_COP_BUILD_DIR=/home/vagrant/traffic-cop-build" >> .bashrc
mkdir traffic-cop-build
sudo chown vagrant:vagrant traffic-cop-build
git clone https://github.com/shuhaowu/wrtfreezer.git
cd wrtfreezer
sudo python setup.py install
popd
SHELL
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.synced_folder ".", "/home/vagrant/trafficcop"
end