Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: add-disk.sh

Issue 29448564: Issue 5277 - Prepare Vagrant files for CI (Closed)
Patch Set: see the changes in commit message https://github.com/4ntoine/libadblockplus-android-ci/commit/d44b6f71a6efb02d46fb594e823c6e810ba79a4f Created May 25, 2017, 1:50 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Vagrantfile ('k') | vagrant-build.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # const
2 VMS="$HOME/VirtualBox VMs"
3 DISK2="box-disk2.vdi"
4 DISK2_SIZE_GB=8
5
6 # find paths
7 VM=`ls "$VMS" | grep libadblockplus-android-ci-vm`
8 VM_PATH="$VMS/$VM"
9 echo "Found VM in $VM_PATH"
10
11 DISK2_PATH="$VM_PATH/$DISK2"
12 if [ -f "$DISK2_PATH" ]
13 then
14 echo "Disk already added, exiting"
15 exit 0
16 fi
17
18 # stop VM
19 echo "Stopping VM..."
20 vagrant halt
21
22 # create disk 2
23 echo "Creating $DISK2 ..."
24 DISK2_SIZE_MB=$(( $DISK2_SIZE_GB * 1024 ))
25
26 VBoxManage createhd --filename "$DISK2_PATH" --size "$DISK2_SIZE_MB" || exit 1;
27 echo "Done"
28
29 # attach disk 2 to VN
30 echo "Attaching disk 2..."
31 VBoxManage storageattach "$VM" --storagectl "SATA Controller" --port 1 --device 0 --type hdd --medium "$DISK2_PATH" || exit 1;
32 echo "Done"
33
34 # vboxmanage list hdds
35 # vboxmanage closemedium disk <uuid> --delete
36
37 # start VM and mount disk 2
38 echo "Starting VM..."
39 vagrant up
40
41 echo "Adding partition..."
42 vagrant ssh -- /vagrant/vagrant-mount-disk.sh
43
44 echo "Done"
OLDNEW
« no previous file with comments | « Vagrantfile ('k') | vagrant-build.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld