summaryrefslogtreecommitdiffstats
path: root/tools/sfwebcron
blob: 89a82ab2ded50b3d0bc28cbc05985e5f8a0f5c3e (plain)
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
31
32
#! /bin/bash
# sfwebcron

# To update the developers-guidelines.html and put in main area
#
# Install in cron with something like:
#  47 7 * * * $HOME/bin/sfwebcron

function die { echo $1; exit 1; }

# Set working variables
PROJECT=nagiosplug
IN=${HOME}/tmp_sfwebcron
OUT="/home/groups/n/na/nagiosplug/htdocs/ton"
DS=`date -u +%Y%m%d%H%M`

# Get latest dev guildelines
[[ ! -d $IN ]] && mkdir $IN
cd $IN
if [[ ! -d $PROJECT ]] ; then
	cvs -z3 -d:pserver:anonymous@cvs1:/cvsroot/nagiosplug co nagiosplug || die "Cannot cvs"
fi
cd nagiosplug/doc
cvs update

# Is the dev guidelines updated?
touch now
make
if [[ developer-guidelines.html -nt now ]] ; then
	cp developer-guidelines.html developer-guidelines.sgml $OUT
fi
rm now