forked from termux/termux-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
34 lines (25 loc) · 1.39 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/disco64"
# use vagrant-disksize plugin to resize partition - https://github.com/sprotheroe/vagrant-disksize
config.disksize.size = '50GB'
config.vm.provider "virtualbox" do |vb|
# Customize the amount of memory on the VM
vb.memory = "4096"
end
# Share the root of the repo
config.vm.synced_folder "../", "/home/vagrant/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
# Filesystem needs to be resized
config.vm.provision "shell", inline: "resize2fs /dev/sda1", privileged: true
# Run environment setup scripts
config.vm.provision "shell", inline: "cd /home/vagrant/termux-packages && ./scripts/setup-ubuntu.sh", privileged: false
config.vm.provision "shell", inline: "cd /home/vagrant/termux-packages && ./scripts/setup-android-sdk.sh", privileged: false
# Fix permissions on the /data directory in order to allow the "vagrant" user to write to it
config.vm.provision "shell",
inline: "chown -R vagrant /data", privileged: true
# 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