Deploy script ...
authorHamed Gorjiara <hgorjiar@uci.edu>
Wed, 15 Aug 2018 00:08:29 +0000 (17:08 -0700)
committerHamed Gorjiara <hgorjiar@uci.edu>
Wed, 15 Aug 2018 00:08:29 +0000 (17:08 -0700)
deploy-cs.sh [new file with mode: 0755]

diff --git a/deploy-cs.sh b/deploy-cs.sh
new file mode 100755 (executable)
index 0000000..3e3dcc7
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+#Terminate the script if even one command fails
+set -e
+
+BASE=../
+SERVERS="dc-8.calit2.uci.edu dc-9.calit2.uci.edu dc-10.calit2.uci.edu dc-11.calit2.uci.edu"
+REMOTEDIR="/scratch/hamed/"
+INFILE="constraint_compiler/"
+SRC="constraint_compiler/src/"
+OUTFILE=csolver.tar.gz
+USER=hamed
+
+cd $BASE
+
+rm -f $OUTFILE
+tar -czvf $OUTFILE $INFILE
+
+for SERVER in $SERVERS; do
+       scp $OUTFILE "$USER@$SERVER:$REMOTEDIR"
+       ssh $USER@$SERVER "cd $REMOTEDIR; sudo rm -r $SRC; tar -xzvf $OUTFILE; cd $SRC; make clean; ./setup.sh"
+done