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

Side by Side Diff: vagrant-mount-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 | « vagrant-emulator.sh ('k') | vagrant-provision.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 #!/bin/sh
2
3 set -e
4 set -x
5
6 if [ -f /home/vagrant/disk_added_date ]
7 then
8 echo "Disk already added, exiting"
9 exit 0
10 fi
11
12 # create partition
13 sudo fdisk -u /dev/sdb <<EOF
14 n
15 p
16 1
17
18
19 w
20 EOF
21
22 # format and mount
23 sudo mkfs.ext4 /dev/sdb1
24 mkdir -p /home/vagrant/build
25 sudo mount -t ext4 -o rw /dev/sdb1 /home/vagrant/build
26 sudo chown vagrant:vagrant /home/vagrant/build
27 sudo echo "/dev/sdb1 /home/vagrant/build ext4 defaults 0 0" >> /etc/fstab
28
29 date > /home/vagrant/disk_added_date
30 sudo chown vagrant:vagrant /home/vagrant/disk_added_date
OLDNEW
« no previous file with comments | « vagrant-emulator.sh ('k') | vagrant-provision.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld