Merge branch 'master' of ssh://db.debian.org/git/dsa-wiki
[mirror/dsa-wiki.git] / bin / update-wiki
1 #!/bin/sh
2
3 set -e
4 umask 0002
5
6 WC="/srv/dsa.debian.org/dsa-wiki"
7 DEST="/srv/dsa.debian.org/htdocs"
8 URL="http://dsa.debian.org/"
9 UPDATE=1
10
11 ! [ -e "$HOME/.dsa-wiki-local" ] || . "$HOME/.dsa-wiki-local"
12
13 [ "$UPDATE" != 1 ] || ( cd "$WC" && env -i git pull )
14
15 if [ "$UPDATE" != 1 ]; then
16         GITPLUGIN=""
17 else
18         GITPLUGIN="--plugin git"
19 fi
20
21 env -i "HOME=$HOME" \
22     ikiwiki \
23         --timeformat '%F' \
24         --wikiname 'DSA' \
25         --url "$URL" \
26         --adminemail debian-admin@debian.org \
27         --underlaydir "$WC/underlay" \
28         --templatedir "$WC/templates" \
29         --no-discussion \
30         --refresh \
31         --atom \
32         --rss \
33         --plugin template \
34         --plugin toggle \
35         --plugin inline \
36         --plugin sidebar \
37         --plugin table \
38         --plugin creole \
39         $GITPLUGIN \
40         --disable-plugin openid \
41         --disable-plugin sandbox \
42         --disable-plugin passwordauth \
43         "$WC/input" \
44         "$DEST"