mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-02-14 00:03:32 -05:00
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
35 lines
835 B
Bash
Executable file
35 lines
835 B
Bash
Executable file
#! /bin/bash
|
|
# sfwebcron
|
|
|
|
# To update the developers-guidelines.html and put in html area
|
|
#
|
|
# Install in cron with something like:
|
|
# 47 7 * * * $HOME/bin/sfwebcron >/tmp/sfwebcron.log 2>&1 || cat /tmp/sfwebcron.log
|
|
|
|
set -eu
|
|
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"
|
|
|
|
# Get latest dev guildelines
|
|
[[ ! -d $IN ]] && mkdir $IN
|
|
cd $IN
|
|
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 [[ ! -e $PROBE || developer-guidelines.html -nt $PROBE ]]
|
|
then
|
|
rsync -av developer-guidelines.{html,sgml} $OUT_SERVER:$OUT_PATH/
|
|
touch $PROBE
|
|
fi
|
|
|