summaryrefslogtreecommitdiffstats
path: root/tools/sfwebcron
diff options
context:
space:
mode:
Diffstat (limited to 'tools/sfwebcron')
-rwxr-xr-xtools/sfwebcron23
1 files changed, 12 insertions, 11 deletions
diff --git a/tools/sfwebcron b/tools/sfwebcron
index d836a0f..c270cef 100755
--- a/tools/sfwebcron
+++ b/tools/sfwebcron
@@ -4,15 +4,16 @@
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" 15OUT_SERVER="tonvoon@frs.sourceforge.net"
15OUT="/home/groups/n/na/nagiosplug/htdocs" 16OUT_PATH="/home/groups/n/na/nagiosplug/htdocs"
16 17
17if [[ ! -e developer-guidelines.html.last ]] ; then 18if [[ ! -e developer-guidelines.html.last ]] ; then
18 touch developer-guidelines.html.last 19 touch developer-guidelines.html.last
@@ -21,15 +22,15 @@ fi
21# Get latest dev guildelines 22# Get latest dev guildelines
22[[ ! -d $IN ]] && mkdir $IN 23[[ ! -d $IN ]] && mkdir $IN
23cd $IN 24cd $IN
24if [[ ! -d doc ]] ; then 25if [[ ! -d nagios-plugins ]] ; then
25 #cvs -z3 -d:pserver:anonymous@cvs1:/cvsroot/nagiosplug co nagiosplug || die "Cannot cvs" 26 git clone https://github.com/nagios-plugins/nagios-plugins.git nagios-plugins
26 svn checkout http://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk/doc doc
27fi 27fi
28cd doc 28cd nagios-plugins/doc
29svn update 29git pull
30 30
31make 31make
32if [[ developer-guidelines.html -nt developer-guidelines.html.last ]] ; then 32if [[ developer-guidelines.html -nt developer-guidelines.html.last ]] ; then
33 scp developer-guidelines.{html,sgml} $OUT_SERVER:$OUT 33 rsync -av developer-guidelines.{html,sgml} $OUT_SERVER:$OUT_PATH/
34 touch developer-guidelines.html.last 34 touch developer-guidelines.html.last
35fi 35fi
36