aboutsummaryrefslogtreecommitdiff
path: root/scripts/cronjob.sh
blob: ab58cf6ced9db809c785b4650bf7466d0e46ba2d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh -
# $Id$
#
# Generate Doxygen manual for RPKI code.
#
# At the moment this is just for the Python libraries.

lock=cronjob.lock

target=/usr/local/www/data/www.hactrn.net/rpki-dox

cd `/usr/bin/dirname $0` || exit

case "$1" in

locked)
    exec >cronjob.log 2>&1
    set -x
    cd rpki || exit
    /usr/local/bin/svn update --quiet
    /bin/rm -rf html
    PATH=/bin:/usr/bin:/usr/local/bin /usr/local/bin/doxygen </dev/null
    /usr/local/bin/rsync --archive --itemize-changes --delete-after html/ $target/
    ;;

*)
    exec /usr/bin/lockf -s -t 0 $lock "$0" locked
    ;;

esac