diff options
author | dermoth <dermoth@nagiosplugins.org> | 2012-11-03 22:01:37 (GMT) |
---|---|---|
committer | dermoth <dermoth@nagiosplugins.org> | 2012-11-03 22:04:53 (GMT) |
commit | d51f87cc797cdc34249878e49d19bb2c5a44d0e5 (patch) | |
tree | fbdae1b2e88fc6a4740fb0cfdc6677766a120317 /tools/sfwebcron | |
parent | 42a7b3d6d6392a4f1a26090a8dc6de9ae93720f1 (diff) | |
download | monitoring-plugins-d51f87cc797cdc34249878e49d19bb2c5a44d0e5.tar.gz |
Update tools
- fix sfwebcron (tool updating sf developer guidelines)
- remove obsolete snapshot script
Diffstat (limited to 'tools/sfwebcron')
-rwxr-xr-x | tools/sfwebcron | 23 |
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 | ||
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 | OUT_SERVER="tonvoon@frs.sourceforge.net" |
15 | OUT="/home/groups/n/na/nagiosplug/htdocs" | 16 | OUT_PATH="/home/groups/n/na/nagiosplug/htdocs" |
16 | 17 | ||
17 | if [[ ! -e developer-guidelines.html.last ]] ; then | 18 | if [[ ! -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 |
23 | cd $IN | 24 | cd $IN |
24 | if [[ ! -d doc ]] ; then | 25 | if [[ ! -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 | ||
27 | fi | 27 | fi |
28 | cd doc | 28 | cd nagios-plugins/doc |
29 | svn update | 29 | git pull |
30 | 30 | ||
31 | make | 31 | make |
32 | if [[ developer-guidelines.html -nt developer-guidelines.html.last ]] ; then | 32 | if [[ 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 |
35 | fi | 35 | fi |
36 | |||