-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
43 lines (35 loc) · 1003 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
$script = <<EOF
set -e
if [[ $(dpkg -l | grep erlang | tail -n 1) == "" ]]; then
sudo apt-get update
sudo apt-get install -y python-software-properties
sudo add-apt-repository -y ppa:scottritchie/erlang-backports
sudo apt-get update
sudo apt-get -y install erlang
fi
if [[ $(dpkg -l | grep build-essential | tail -n 1) == "" ]]; then
sudo apt-get -y install build-essential
fi
if [[ $(dpkg -l | grep git-core | tail -n 1) == "" ]]; then
sudo apt-get -y install git-core
fi
if [ -d teles ]; then
cd teles && git pull && cd ..
else
git clone https://github.com/armon/teles
fi
if [ ! -x teles/rel/teles/bin/teles ]; then
pushd teles
make deps
make rel
popd
fi
ps elf | grep -i teles | awk '{print "kill -9 "$2}' | sh
sudo ./teles/rel/teles/bin/teles start
echo "Done."
EOF
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/precise64"
config.vm.provision :shell, :inline => $script
config.vm.network :public_network, :bridge => "en0: Wi-Fi (AirPort)"
end