summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtools/sfwebcron32
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/sfwebcron b/tools/sfwebcron
new file mode 100755
index 00000000..89a82ab2
--- /dev/null
+++ b/tools/sfwebcron
@@ -0,0 +1,32 @@
1#! /bin/bash
2# sfwebcron
3
4# To update the developers-guidelines.html and put in main area
5#
6# Install in cron with something like:
7# 47 7 * * * $HOME/bin/sfwebcron
8
9function die { echo $1; exit 1; }
10
11# Set working variables
12PROJECT=nagiosplug
13IN=${HOME}/tmp_sfwebcron
14OUT="/home/groups/n/na/nagiosplug/htdocs/ton"
15DS=`date -u +%Y%m%d%H%M`
16
17# Get latest dev guildelines
18[[ ! -d $IN ]] && mkdir $IN
19cd $IN
20if [[ ! -d $PROJECT ]] ; then
21 cvs -z3 -d:pserver:anonymous@cvs1:/cvsroot/nagiosplug co nagiosplug || die "Cannot cvs"
22fi
23cd nagiosplug/doc
24cvs update
25
26# Is the dev guidelines updated?
27touch now
28make
29if [[ developer-guidelines.html -nt now ]] ; then
30 cp developer-guidelines.html developer-guidelines.sgml $OUT
31fi
32rm now