From 8a0da1ad11bb7a9b91c33678be66f772821a8fce Mon Sep 17 00:00:00 2001 From: casept Date: Tue, 3 Jan 2017 19:05:15 +0100 Subject: [PATCH] Add vagrant (#642) --- .gitignore | 3 +++ scripts/Vagrantfile | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 scripts/Vagrantfile diff --git a/.gitignore b/.gitignore index 71aec2fd4e4cc5..a27db0bd1f7a64 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,6 @@ Session.vim .netrwhist *~ /debs/ +### Vagrant ### +scripts/*.log +scripts/.vagrant/ diff --git a/scripts/Vagrantfile b/scripts/Vagrantfile new file mode 100644 index 00000000000000..77915c9911c73c --- /dev/null +++ b/scripts/Vagrantfile @@ -0,0 +1,29 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + + config.vm.box = "ubuntu/xenial64" + + config.vm.provider "virtualbox" do |vb| + # Customize the amount of memory on the VM + vb.memory = "2048" + end + + #Share the root of the repo + config.vm.synced_folder "../", "/termux-packages" + #Disable the default /vagrant share directory, as it shares the directory with the Vagrantfile in it, not the repo root + config.vm.synced_folder ".", "/vagrant", disabled: true + + + #Run provisioning scripts + config.vm.provision "shell", path: "./setup-ubuntu.sh", privileged: false + config.vm.provision "shell", path: "./setup-android-sdk.sh", privileged: false + + #Fix permissions on the /data directory in order to allow the "ubuntu" user to write to it + config.vm.provision "shell", + inline: "sudo chown -R ubuntu /data" + + #Tell the user how to use the VM + 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