2017-01-03 19:05:15 +01:00
|
|
|
# -*- mode: ruby -*-
|
|
|
|
# vi: set ft=ruby :
|
|
|
|
|
|
|
|
Vagrant.configure("2") do |config|
|
|
|
|
|
2017-11-21 06:05:04 +01:00
|
|
|
config.vm.box = "ubuntu/artful64"
|
2017-01-03 19:05:15 +01:00
|
|
|
|
|
|
|
config.vm.provider "virtualbox" do |vb|
|
|
|
|
# Customize the amount of memory on the VM
|
|
|
|
vb.memory = "2048"
|
|
|
|
end
|
|
|
|
|
2017-11-21 06:05:04 +01:00
|
|
|
# Share the root of the repo
|
2017-01-03 19:05:15 +01:00
|
|
|
config.vm.synced_folder "../", "/termux-packages"
|
2017-11-21 06:05:04 +01:00
|
|
|
# Disable the default /vagrant share directory, as it shares the directory with the Vagrantfile in it, not the repo root
|
2017-01-03 19:05:15 +01:00
|
|
|
config.vm.synced_folder ".", "/vagrant", disabled: true
|
|
|
|
|
|
|
|
|
2017-11-21 06:05:04 +01:00
|
|
|
# Run provisioning scripts
|
2017-01-03 19:05:15 +01:00
|
|
|
config.vm.provision "shell", path: "./setup-ubuntu.sh", privileged: false
|
|
|
|
config.vm.provision "shell", path: "./setup-android-sdk.sh", privileged: false
|
|
|
|
|
2017-11-21 06:05:04 +01:00
|
|
|
# Fix permissions on the /data directory in order to allow the "ubuntu" user to write to it
|
2017-01-03 19:05:15 +01:00
|
|
|
config.vm.provision "shell",
|
|
|
|
inline: "sudo chown -R ubuntu /data"
|
|
|
|
|
2017-11-21 06:05:04 +01:00
|
|
|
# Tell the user how to use the VM
|
2017-01-03 19:05:15 +01:00
|
|
|
config.vm.post_up_message = "Box has been provisioned! Use 'vagrant ssh' to enter the box. The repository root is available under '/termux-packages'."
|
|
|
|
end
|