Adding a directed search based config for the tuner
[satune.git] / deploy-cs.sh
1 #!/bin/bash
2
3 #Terminate the script if even one command fails
4 set -e
5
6 BASE=../
7 SERVERS="dc-5.calit2.uci.edu dc-7.calit2.uci.edu dc-8.calit2.uci.edu dc-9.calit2.uci.edu dc-10.calit2.uci.edu dc-11.calit2.uci.edu"
8 REMOTEDIR="/scratch/hamed/"
9 INFILE="constraint_compiler/"
10 SRC="constraint_compiler/src/"
11 SHAREDDIR=~/
12 OUTFILE=csolver.tar.gz
13 USER=hamed
14
15 cd $BASE
16
17 rm -f $OUTFILE
18 tar -czvf $OUTFILE $INFILE
19
20 for SERVER in $SERVERS; do
21         cp $OUTFILE $SHAREDDIR
22         ssh $USER@$SERVER "mv $SHAREDDIR$OUTFILE $REMOTEDIR; cd $REMOTEDIR; sudo rm -r $SRC; tar -xzvf $OUTFILE; cd $SRC; make clean; ./setup.sh"
23 done