summaryrefslogtreecommitdiff
path: root/roles/sublab_web/templates/website-rebuild.sh.j2
blob: 5cd3964b2dc7b9b42b8da02aa0dcf2c09f7030c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh -e
#
# {{ ansible_managed }}
#

if [ "$USER" != "sublab_web" ]; then
	exec sudo -u sublab_web /var/www/{{sublab_web_server_name}}/website-rebuild.sh
fi

cd /var/www/{{sublab_web_server_name}}/htdocs

if [ x"$1" != x"-l" ]; then
    git fetch git://{{ groups['gitservers'][0] }}/website.git master
    git reset --hard FETCH_HEAD
fi
cd scripts
python template.py
python wikitemplate.py > ../../wiki-page.tmpl