summaryrefslogtreecommitdiffstats
path: root/tools/sfwebcron
diff options
context:
space:
mode:
Diffstat (limited to 'tools/sfwebcron')
-rwxr-xr-xtools/sfwebcron34
1 files changed, 17 insertions, 17 deletions
diff --git a/tools/sfwebcron b/tools/sfwebcron
index d836a0f..0f31fcf 100755
--- a/tools/sfwebcron
+++ b/tools/sfwebcron
@@ -4,32 +4,32 @@
4# To update the developers-guidelines.html and put in html area 4# To update the developers-guidelines.html and put in html area
5# 5#
6# Install in cron with something like: 6# Install in cron with something like:
7# 47 7 * * * $HOME/bin/sfwebcron 7# 47 7 * * * $HOME/bin/sfwebcron >/tmp/sfwebcron.log 2>&1 || cat /tmp/sfwebcron.log
8 8
9function die { echo $1; exit 1; } 9set -eu
10trap 'echo "Command failed at line $LINENO"' ERR
10 11
11# Set working variables 12# Set working variables
12PROJECT=nagiosplug 13PROJECT=nagiosplug
13IN=${HOME}/tmp_sfwebcron 14IN=${HOME}/sfwebcron
14OUT_SERVER="tonvoon@shell.sf.net" 15PROBE="developer-guidelines.html.last"
15OUT="/home/groups/n/na/nagiosplug/htdocs" 16OUT_SERVER="tonvoon@frs.sourceforge.net"
16 17OUT_PATH="/home/groups/n/na/nagiosplug/htdocs"
17if [[ ! -e developer-guidelines.html.last ]] ; then
18 touch developer-guidelines.html.last
19fi
20 18
21# Get latest dev guildelines 19# Get latest dev guildelines
22[[ ! -d $IN ]] && mkdir $IN 20[[ ! -d $IN ]] && mkdir $IN
23cd $IN 21cd $IN
24if [[ ! -d doc ]] ; then 22if [[ ! -d nagios-plugins ]]
25 #cvs -z3 -d:pserver:anonymous@cvs1:/cvsroot/nagiosplug co nagiosplug || die "Cannot cvs" 23then
26 svn checkout http://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk/doc doc 24 git clone https://github.com/nagios-plugins/nagios-plugins.git nagios-plugins
27fi 25fi
28cd doc 26cd nagios-plugins/doc
29svn update 27git pull
30 28
31make 29make
32if [[ developer-guidelines.html -nt developer-guidelines.html.last ]] ; then 30if [[ ! -e $PROBE || developer-guidelines.html -nt $PROBE ]]
33 scp developer-guidelines.{html,sgml} $OUT_SERVER:$OUT 31then
34 touch developer-guidelines.html.last 32 rsync -av developer-guidelines.{html,sgml} $OUT_SERVER:$OUT_PATH/
33 touch $PROBE
35fi 34fi
35