summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2007-07-24 00:35:16 +0000
committerTon Voon <tonvoon@users.sourceforge.net>2007-07-24 00:35:16 +0000
commitff50baf6dead1fa1e095ba7b8c3041c29a588172 (patch)
tree5f03bd4cbd6eed882d6ffde77008eb012f8dd90f /tools
parent475ee7b55a24ed6a17e0bb5ef762560ebb0ab152 (diff)
downloadmonitoring-plugins-ff50baf6dead1fa1e095ba7b8c3041c29a588172.tar.gz
Updated to use svn instead of cvs
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1760 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'tools')
-rwxr-xr-xtools/sfsnapshot28
-rwxr-xr-xtools/sfwebcron20
2 files changed, 28 insertions, 20 deletions
diff --git a/tools/sfsnapshot b/tools/sfsnapshot
index 46f34a3d..efc5f013 100755
--- a/tools/sfsnapshot
+++ b/tools/sfsnapshot
@@ -12,26 +12,27 @@
12 12
13function die { echo $1; exit 1; } 13function die { echo $1; exit 1; }
14 14
15# This makes the distribution. Expects $1 as CVS tag, otherwise uses HEAD 15# This makes the distribution. Expects $1 as branches/name, otherwise uses trunk
16function make_dist { 16function make_dist {
17 if [[ -n $1 ]] ; then 17 if [[ -n $1 ]] ; then
18 cvs_rel=$1 18 svn_url_suffix=$1
19 v="$1-" 19 name=${1##*/}
20 else 20 else
21 cvs_rel="HEAD" 21 svn_url_suffix="trunk"
22 v="HEAD-" 22 name="trunk"
23 fi 23 fi
24 v="$name-"
24 25
25 # Get compile server to do the work 26 # Get compile server to do the work
26 # Variables will be expanded locally before being run on $CF 27 # Variables will be expanded locally before being run on $CF
27 ssh $CF <<EOF 28 ssh $CF <<EOF
28 set -x 29 set -x
29 PATH=$PATH:/usr/local/bin 30 PATH=$PATH:/usr/local/bin
30 [[ ! -d $COMPILE_DIR/$cvs_rel ]] && mkdir -p $COMPILE_DIR/$cvs_rel 31 [[ ! -d $COMPILE_DIR/$name ]] && mkdir -p $COMPILE_DIR/$name
31 cd $COMPILE_DIR/$cvs_rel 32 cd $COMPILE_DIR/$name
32 33
33 # Cannot use cvs export due to conflicts on second run - think this is better for cvs server 34 # Cannot use cvs export due to conflicts on second run - think this is better for cvs server
34 CVS_RSH=ssh cvs -z3 -d:ext:tonvoon@nagiosplug.cvs.sourceforge.net:/cvsroot/nagiosplug co -r $cvs_rel nagiosplug 35 svn export https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/$svn_url_suffix $PROJECT
35 36
36 cd $PROJECT 37 cd $PROJECT
37 38
@@ -60,11 +61,11 @@ COMPILE_DIR=/tmp/tonvoon/tmp_snapshot
60IN=${HOME}/tmp_snapshot 61IN=${HOME}/tmp_snapshot
61 62
62# Where to place the generated files 63# Where to place the generated files
63OUT_SERVER="shell.sf.net" 64OUT_SERVER="tonvoon@shell.sf.net"
64OUT="/home/groups/n/na/nagiosplug/htdocs/snapshot" 65OUT="/home/groups/n/na/nagiosplug/htdocs/snapshot"
65 66
66# Make sure prereqs are satisfied on server! 67# Make sure prereqs are satisfied on server!
67CF="x86-linux2" 68CF="localhost"
68DS=`date -u +%Y%m%d%H%M` 69DS=`date -u +%Y%m%d%H%M`
69 70
70# Setup home directory area 71# Setup home directory area
@@ -80,7 +81,7 @@ done
80set -x 81set -x
81files=$(ls $IN/*.gz 2>/dev/null) 82files=$(ls $IN/*.gz 2>/dev/null)
82[[ -z $files ]] && die "No files created" 83[[ -z $files ]] && die "No files created"
83head_file=$(cd $IN && ls *HEAD*.gz 2>/dev/null) 84head_file=$(cd $IN && ls *-trunk-*.gz 2>/dev/null)
84ssh -2 $OUT_SERVER "rm -f $OUT/*.gz" 85ssh -2 $OUT_SERVER "rm -f $OUT/*.gz"
85scp -2 $files $OUT_SERVER:$OUT 86scp -2 $files $OUT_SERVER:$OUT
86if [[ -n $head_file ]] ; then 87if [[ -n $head_file ]] ; then
@@ -91,10 +92,11 @@ fi
91ssh -2 $OUT_SERVER << EOF 92ssh -2 $OUT_SERVER << EOF
92cd $OUT 93cd $OUT
93cat <<-END_README > README 94cat <<-END_README > README
94This is the daily CVS snapshot of nagiosplug, consisting of the CVS HEAD 95This is the daily SVN snapshot of nagiosplug, consisting of the SVN trunk
95and any other branches. 96and any other branches.
96 97
97The nagios-plugins-HEAD.tar.gz link will always go to the latest HEAD snapshot. 98The nagios-plugins-HEAD.tar.gz link will always go to the latest trunk snapshot
99(name kept for existing tinderbox scripts to link correctly).
98 100
99The MD5SUM is: 101The MD5SUM is:
100END_README 102END_README
diff --git a/tools/sfwebcron b/tools/sfwebcron
index 9824de85..d836a0fd 100755
--- a/tools/sfwebcron
+++ b/tools/sfwebcron
@@ -11,19 +11,25 @@ function die { echo $1; exit 1; }
11# Set working variables 11# Set working variables
12PROJECT=nagiosplug 12PROJECT=nagiosplug
13IN=${HOME}/tmp_sfwebcron 13IN=${HOME}/tmp_sfwebcron
14OUT_SERVER="tonvoon@shell.sf.net"
14OUT="/home/groups/n/na/nagiosplug/htdocs" 15OUT="/home/groups/n/na/nagiosplug/htdocs"
15 16
17if [[ ! -e developer-guidelines.html.last ]] ; then
18 touch developer-guidelines.html.last
19fi
20
16# Get latest dev guildelines 21# Get latest dev guildelines
17[[ ! -d $IN ]] && mkdir $IN 22[[ ! -d $IN ]] && mkdir $IN
18cd $IN 23cd $IN
19if [[ ! -d $PROJECT ]] ; then 24if [[ ! -d doc ]] ; then
20 cvs -z3 -d:pserver:anonymous@cvs1:/cvsroot/nagiosplug co nagiosplug || die "Cannot cvs" 25 #cvs -z3 -d:pserver:anonymous@cvs1:/cvsroot/nagiosplug co nagiosplug || die "Cannot cvs"
26 svn checkout http://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk/doc doc
21fi 27fi
22cd nagiosplug/doc 28cd doc
23cvs update 29svn update
24 30
25# Is the dev guidelines updated?
26make 31make
27if [[ developer-guidelines.html -nt $OUT/developer-guidelines.html ]] ; then 32if [[ developer-guidelines.html -nt developer-guidelines.html.last ]] ; then
28 cp developer-guidelines.html developer-guidelines.sgml $OUT 33 scp developer-guidelines.{html,sgml} $OUT_SERVER:$OUT
34 touch developer-guidelines.html.last
29fi 35fi