diff options
Diffstat (limited to 'tools/sfwebcron')
-rwxr-xr-x | tools/sfwebcron | 34 |
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 | ||
9 | function die { echo $1; exit 1; } | 9 | set -eu |
10 | trap 'echo "Command failed at line $LINENO"' ERR | ||
10 | 11 | ||
11 | # Set working variables | 12 | # Set working variables |
12 | PROJECT=nagiosplug | 13 | PROJECT=nagiosplug |
13 | IN=${HOME}/tmp_sfwebcron | 14 | IN=${HOME}/sfwebcron |
14 | OUT_SERVER="tonvoon@shell.sf.net" | 15 | PROBE="developer-guidelines.html.last" |
15 | OUT="/home/groups/n/na/nagiosplug/htdocs" | 16 | OUT_SERVER="tonvoon@frs.sourceforge.net" |
16 | 17 | OUT_PATH="/home/groups/n/na/nagiosplug/htdocs" | |
17 | if [[ ! -e developer-guidelines.html.last ]] ; then | ||
18 | touch developer-guidelines.html.last | ||
19 | fi | ||
20 | 18 | ||
21 | # Get latest dev guildelines | 19 | # Get latest dev guildelines |
22 | [[ ! -d $IN ]] && mkdir $IN | 20 | [[ ! -d $IN ]] && mkdir $IN |
23 | cd $IN | 21 | cd $IN |
24 | if [[ ! -d doc ]] ; then | 22 | if [[ ! -d nagios-plugins ]] |
25 | #cvs -z3 -d:pserver:anonymous@cvs1:/cvsroot/nagiosplug co nagiosplug || die "Cannot cvs" | 23 | then |
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 |
27 | fi | 25 | fi |
28 | cd doc | 26 | cd nagios-plugins/doc |
29 | svn update | 27 | git pull |
30 | 28 | ||
31 | make | 29 | make |
32 | if [[ developer-guidelines.html -nt developer-guidelines.html.last ]] ; then | 30 | if [[ ! -e $PROBE || developer-guidelines.html -nt $PROBE ]] |
33 | scp developer-guidelines.{html,sgml} $OUT_SERVER:$OUT | 31 | then |
34 | touch developer-guidelines.html.last | 32 | rsync -av developer-guidelines.{html,sgml} $OUT_SERVER:$OUT_PATH/ |
33 | touch $PROBE | ||
35 | fi | 34 | fi |
35 | |||