Deploy script for copying binary to arcade cab for testing
authorCarl Myers <cmyers@cmyers.org>
Wed, 4 Apr 2012 06:14:23 +0000 (23:14 -0700)
committerCarl Myers <cmyers@cmyers.org>
Wed, 4 Apr 2012 06:14:23 +0000 (23:14 -0700)
deploy.sh [new file with mode: 0755]

diff --git a/deploy.sh b/deploy.sh
new file mode 100755 (executable)
index 0000000..a6bcc55
--- /dev/null
+++ b/deploy.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+HOST=root@itg
+if [[ "x$1" != "x" ]]; then
+    HOST=$1
+fi
+
+PORT=22
+if [[ "x$2" != "x" ]]; then
+  PORT=$2
+fi
+
+scp -P $PORT src/openitg $HOST:/stats/patch/openitg-`git describe`
+ssh -p $PORT $HOST "mv /stats/patch/openitg /stats/patch/openitg.old && ln -s /stats/patch/openitg-`git describe` /stats/patch/openitg"
+ssh -p $PORT $HOST 'pkill openitg'
+