c76fbd38a36472a85a45d45e40843ca325e213fd
[hcoop/scripts.git] / deploy-domtool-on-host
1 #!/bin/bash -e
2
3 if [ -z "$1" ]; then
4 echo "Must supply --slave or --server"
5 exit 1
6 fi
7
8 cd /afs/hcoop.net/common/domtool/build/$(hostname)/domtool2
9
10 git checkout release # just in case
11 git pull
12
13 make
14
15 if [ x"$2" = "x--bootstrap" ]; then
16 sudo make install
17 case $1 in
18 --server)
19 sudo insserv domtool-server
20 ;;
21 --slave)
22 sudo insserv domtool-slave
23 ;;
24 esac
25 fi
26
27 if [ "$1" = "--server" ]; then
28 echo "Installing Server"
29 sudo make install_serverslave
30 domtool-doc -basis -out /afs/hcoop.net/user/h/hc/hcoop/public_html/domtool
31 fi
32
33 if [ "$1" = "--slave" ]; then
34 echo "Installing Slave"
35 sudo make install_slave
36 fi