Guest User

Untitled

a guest
Mar 24th, 2018
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. branch=$1
  4. clean=$2
  5. repo=git@github.com:Chillee/Spiritual.git
  6. name=Spiritual
  7.  
  8. if [ -z $branch ]; then
  9. echo "You need to provide a branch name"
  10. exit -1
  11. fi
  12.  
  13. # clone repository into shared folder
  14. cd shared
  15. rm -rf $name
  16. git clone -b $branch $repo
  17. cd ..
  18.  
  19. if [ $clean = "clean" ]; then
  20. vagrant destroy -f
  21. fi
  22.  
  23. # turn on virtual machine
  24. vagrant up
  25.  
  26. # pipe commands into vagrant ssh
  27. vagrant ssh << EOF
  28. cd ~/shared/$name
  29. ./xic-build
  30. EOF
  31.  
  32. # turn off virtual machine
  33. vagrant halt
Add Comment
Please, Sign In to add comment