summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNavaL <ayoyo@thoughtworks.com>2016-02-08 14:38:06 +0100
committerNavaL <ayoyo@thoughtworks.com>2016-02-08 14:38:50 +0100
commit8e24231c6e3c451f053f838caa5f8f7ab275d564 (patch)
treeafd9496a5a22db72e0781e047169637510a46d8a
parent44f560887d48c1b0980613760453e9f8740a6fd6 (diff)
Adding vagrant setup online command
Issue #593
-rw-r--r--vagrant_onliner_install.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/vagrant_onliner_install.sh b/vagrant_onliner_install.sh
new file mode 100644
index 00000000..4e7576ee
--- /dev/null
+++ b/vagrant_onliner_install.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+#
+
+hash vagrant 2>/dev/null || { echo >&2 "Vagrant is not installed. Aborting."; exit 1; }
+hash vboxmanage 2>/dev/null || hash virsh 2>/dev/null || { echo >&2 "Please install Virtualbox or Libvirt first and try again."; exit 1;}
+
+vagrant_ssh (){
+ vagrant ssh -c "export LANG=en_US.UTF-8; export LANGUAGE=en_US.UTF-8; export LC_ALL=en_US.UTF-8; cd $1; $2"
+}
+
+if [ -d ./pixelated-user-agent ]
+then
+ cd pixelated-user-agent
+ /usr/bin/git pull --rebase
+else
+ /usr/bin/git clone https://github.com/pixelated/pixelated-user-agent.git
+ cd pixelated-user-agent
+fi
+
+vagrant up
+vagrant_ssh '/vagrant/service' './go setup'
+vagrant ssh