Code

Adding new tinderbox build script
[nagiosplug.git] / tools / sfwebcron
1 #! /bin/bash
2 # sfwebcron
4 # To update the developers-guidelines.html and put in html area
5 #
6 # Install in cron with something like:
7 #  47 7 * * * $HOME/bin/sfwebcron
9 function die { echo $1; exit 1; }
11 # Set working variables
12 PROJECT=nagiosplug
13 IN=${HOME}/tmp_sfwebcron
14 OUT="/home/groups/n/na/nagiosplug/htdocs"
16 # Get latest dev guildelines
17 [[ ! -d $IN ]] && mkdir $IN
18 cd $IN
19 if [[ ! -d $PROJECT ]] ; then
20         cvs -z3 -d:pserver:anonymous@cvs1:/cvsroot/nagiosplug co nagiosplug || die "Cannot cvs"
21 fi
22 cd nagiosplug/doc
23 cvs update
25 # Is the dev guidelines updated?
26 make
27 if [[ developer-guidelines.html -nt $OUT/developer-guidelines.html ]] ; then
28         cp developer-guidelines.html developer-guidelines.sgml $OUT
29 fi