Sergio Slobodrian | ee4b2bc | 2017-06-05 10:08:59 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | vmName="voltha_voltha" |
| 4 | |
| 5 | # Voltha directory |
| 6 | cd .. |
| 7 | |
| 8 | # Destroy the VM if it's running |
| 9 | vagrant destroy voltha |
| 10 | |
| 11 | # Bring up the VM. |
| 12 | vagrant up voltha |
| 13 | |
| 14 | # Get the VM's ip address |
| 15 | ipAddr=`virsh domifaddr $vmName | tail -n +3 | awk '{ print $4 }' | sed -e 's~/.*~~'` |
| 16 | |
| 17 | # Run all the build commands |
| 18 | ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i .vagrant/machines/voltha/libvirt/private_key vagrant@$ipAddr "cd /cord/incubator/voltha && . env.sh && make fetch && make" |