forked from joy-framework/joy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
45 lines (32 loc) · 1.35 KB
/
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
44
45
$script = <<SCRIPT
echo "=== Updating packages"
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y aptitude
sudo DEBIAN_FRONTEND=noninteractive aptitude update
sudo DEBIAN_FRONTEND=noninteractive aptitude -y safe-upgrade
echo "=== Installing new packages"
sudo DEBIAN_FRONTEND=noninteractive aptitude install -y build-essentials libcurl4-gnutls-dev curl vim cmake
echo "=== Installing latest git"
sudo DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:git-core/ppa
sudo DEBIAN_FRONTEND=noninteractive aptitude update
sudo DEBIAN_FRONTEND=noninteractive aptitude install -y git
echo "=== Installing janet"
sudo git clone https://github.com/janet-lang/janet.git /tmp/janet
cd /tmp/janet
sudo make all test install
sudo chmod 777 /usr/local/lib/janet
echo "=== Installing joy"
sudo jpm install joy
sudo chown -R vagrant:vagrant /usr/local/lib/janet
echo "=== Setting default editor to vim"
sudo echo "export EDITOR='vim'" >> /home/vagrant/.bashrc
sudo chown vagrant:vagrant /home/vagrant/.bashrc
echo "*********************"
echo "PROVISIONING FINISHED"
echo "*********************"
SCRIPT
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.hostname = "joy"
config.vm.network :forwarded_port, guest: 9001, host: 9001
config.vm.provision "shell", inline: $script, privileged: false
end