ソースを参照

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
Thomas Guyot-Sionnest 13 年 前
コミット
217a6a7643
3 ファイル変更9 行追加8 行削除
  1. 2 0
      .gitignore
  2. 1 1
      doc/makefile
  3. 6 7
      tools/sfwebcron

+ 2 - 0
.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

+ 1 - 1
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

+ 6 - 7
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@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