[nagiosplug] Fix sfwebcron probe file

Nagios Plugin Development nagios-plugins at users.sourceforge.net
Wed Nov 7 18:40:59 CET 2012


 Module: nagiosplug
 Branch: master
 Commit: 217a6a7643867ad949c25b5e8ca2d1839ec28133
 Author: Thomas Guyot-Sionnest <dermoth at aei.ca>
   Date: Wed Nov  7 17:57:37 2012 +0000
    URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=217a6a7

Fix sfwebcron probe file

The initial file was created in the user's home and later tested in the
doc directory. Instead, just rsync if the file is missing.

Also add some temporary files to gitignore/make clean

---

 .gitignore      |    2 ++
 doc/makefile    |    2 +-
 tools/sfwebcron |   13 ++++++-------
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/.gitignore b/.gitignore
index 52ca6aa..bda7b27 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,6 +37,8 @@ NP-VERSION-FILE
 
 # /doc/
 /doc/developer-guidelines.html
+/doc/developer-guidelines.html.last
+/doc/jade-out.fot
 
 # /tap/
 /tap/.deps
diff --git a/doc/makefile b/doc/makefile
index b1b56c1..89caf9e 100644
--- a/doc/makefile
+++ b/doc/makefile
@@ -8,4 +8,4 @@ developer-guidelines.html: developer-guidelines.sgml
 	fi
 
 clean:
-	rm -f developer-guidelines.html
+	rm -f developer-guidelines.html developer-guidelines.html.last jade-out.fot
diff --git a/tools/sfwebcron b/tools/sfwebcron
index c270cef..0f31fcf 100755
--- a/tools/sfwebcron
+++ b/tools/sfwebcron
@@ -12,25 +12,24 @@ trap 'echo "Command failed at line $LINENO"' ERR
 # Set working variables
 PROJECT=nagiosplug
 IN=${HOME}/sfwebcron
+PROBE="developer-guidelines.html.last"
 OUT_SERVER="tonvoon at frs.sourceforge.net"
 OUT_PATH="/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 nagios-plugins ]] ; then
+if [[ ! -d nagios-plugins ]]
+then
 	git clone https://github.com/nagios-plugins/nagios-plugins.git nagios-plugins
 fi
 cd nagios-plugins/doc
 git pull
 
 make
-if [[ developer-guidelines.html -nt developer-guidelines.html.last ]] ; then
+if [[ ! -e $PROBE || developer-guidelines.html -nt $PROBE ]]
+then
 	rsync -av developer-guidelines.{html,sgml} $OUT_SERVER:$OUT_PATH/
-	touch developer-guidelines.html.last
+	touch $PROBE
 fi
 





More information about the Commits mailing list