aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Ton Voon <tonvoon@users.sourceforge.net> 2004-06-26 16:39:02 +0000
committerGravatar Ton Voon <tonvoon@users.sourceforge.net> 2004-06-26 16:39:02 +0000
commit2243e52612c93ea5c07dfe7a4fb68d2471283ce3 (patch)
treed0fda00fc42fd53b912f018f327ff04346d2e1db
parentd158e47189abffb0f754231b214953ea22063ae9 (diff)
downloadmonitoring-plugins-2243e52612c93ea5c07dfe7a4fb68d2471283ce3.tar.gz
Change of compile server and cleanups
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@880 f882894a-f735-0410-b71e-b25c423dba1c
-rwxr-xr-xtools/sfsnapshot39
1 files changed, 27 insertions, 12 deletions
diff --git a/tools/sfsnapshot b/tools/sfsnapshot
index 122fb717..a383760e 100755
--- a/tools/sfsnapshot
+++ b/tools/sfsnapshot
@@ -3,10 +3,10 @@
# Butchered version of snapshot
# Can only run on the shell compile farm server
# Will always create a snapshot of HEAD
-# If want multiple snapshots, just run with "sfsnapshot {branch} [branch2 ...]"
+# If want multiple snapshots, just run with "sfsnapshot [branch ...]"
# Assumes:
# ssh setup to send to shell.sf.net and $CF without password prompt
-# autconf and automake installed on shell cf at v 2.57 & 1.72 and in PATH
+# the compile server has all the prerequisites stated at http://nagiosplug.sourceforge.net/developer-guidelines.html
# Install in cron with something like:
# 47 * * * * $HOME/bin/mail_error -o $HOME/sfsnapshot.out -m tonvoon@users.sf.net sfsnapshot r1_3_0
@@ -27,34 +27,49 @@ function make_dist {
ssh $CF <<EOF
set -x
PATH=$PATH
- [[ ! -d $IN/$cvs_rel ]] && mkdir -p $IN/$cvs_rel
- cd $IN/$cvs_rel
- #rm -f $PROJECT/configure.in
+ [[ ! -d $COMPILE_DIR/$cvs_rel ]] && mkdir -p $COMPILE_DIR/$cvs_rel
+ cd $COMPILE_DIR/$cvs_rel
+
+ # Cannot use cvs export due to conflicts on second run - think this is better for cvs server
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/nagiosplug co -r $cvs_rel nagiosplug
+
cd $PROJECT
- #sed 's/^VER=.*/VER=$v$DS/;s/^REL=.*/REL=snapshot/' configure.in > configure.tmp
- #mv configure.tmp configure.in
+
+ # TODO: Maybe this should only be run when necessary?
tools/setup
+
./configure
# Make the Nagiosplug dist tarball
make dist VERSION=$v$DS RELEASE=snapshot
+ # May fail if file not generated - do not trap
+ mv *.gz $IN
+
# End ssh
EOF
}
# Set working variables
PROJECT=nagiosplug
+
+# This is local to the compile server for faster compile
+COMPILE_DIR=/tmp/tonvoon/tmp_snapshot
+
+# Needs to be on NFS so gz file can be read on the compile shell server
IN=${HOME}/tmp_snapshot
+
+# Where to place the generated files
OUT_SERVER="shell.sf.net"
OUT="/home/groups/n/na/nagiosplug/htdocs/snapshot"
-CF="usf-cf-x86-linux-2"
-CF="usf-cf-x86-linux-1"
-CF="x86-linux2"
-CF="x86-linux1"
+
+# Make sure prereqs are satisfied on server!
+CF="x86-solaris1"
DS=`date -u +%Y%m%d%H%M`
+# Setup home directory area
+[[ ! -d $IN ]] && mkdir -p $IN
+
# Make dists for HEAD and any others in command parameters
make_dist
for i in $* ; do
@@ -63,7 +78,7 @@ done
# Check for *.gz files locally (expect NFS between cf shell server and $CF)
set -x
-files=$(ls $IN/*/$PROJECT/*.gz 2>/dev/null)
+files=$(ls $IN/*.gz 2>/dev/null)
[[ -z $files ]] && die "No files created"
ssh $OUT_SERVER "rm -f $OUT/*.gz"
scp $files $OUT_SERVER:$OUT