summaryrefslogtreecommitdiffstats
path: root/tools/sfwebcron
blob: d836a0fdaca63b1ec108c1567c2c1eae43666370 (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
33
34
35
#! /bin/bash
# sfwebcron

# To update the developers-guidelines.html and put in html 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_SERVER="tonvoon@shell.sf.net"
OUT="/home/groups/n/na/nagiosplug/htdocs"

if [[ ! -e developer-guidelines.html.last ]] ; then
	touch developer-guidelines.html.last
fi

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

make
if [[ developer-guidelines.html -nt developer-guidelines.html.last ]] ; then
	scp developer-guidelines.{html,sgml} $OUT_SERVER:$OUT
	touch developer-guidelines.html.last
fi