Awful
[openitg.git] / deploy.sh
1 #!/bin/bash
2
3 HOST=root@itg
4 if [[ "x$1" != "x" ]]; then
5 HOST=$1
6 fi
7
8 PORT=22
9 if [[ "x$2" != "x" ]]; then
10 PORT=$2
11 fi
12
13 scp -P $PORT src/openitg $HOST:/stats/patch/openitg-`git describe`
14 ssh -p $PORT $HOST "mv /stats/patch/openitg /stats/patch/openitg.old && ln -s /stats/patch/openitg-`git describe` /stats/patch/openitg"
15 ssh -p $PORT $HOST 'pkill openitg'
16