summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtools/sfsnapshot56
1 files changed, 56 insertions, 0 deletions
diff --git a/tools/sfsnapshot b/tools/sfsnapshot
new file mode 100755
index 0000000..47421af
--- /dev/null
+++ b/tools/sfsnapshot
@@ -0,0 +1,56 @@
1#! /bin/bash
2
3# Butchered version of snapshot
4# Can only run on the shell compile farm server
5# Assumes:
6# ssh setup to send to shell.sf.net and $CF without password prompt
7# autconf and automake installed on shell cf at v 2.57 & 1.72 and in PATH
8
9function die { echo $1; exit 1; }
10
11# Set working variables
12PROJECT=nagiosplug
13IN=${HOME}/tmp_snapshot
14OUT_SERVER="shell.sf.net"
15OUT="/home/groups/n/na/nagiosplug/htdocs/snapshot"
16CF="usf-cf-x86-linux-2"
17DS=`date -u +%Y%m%d%H%M`
18
19# Get compile server to do the work
20# Variables will be expanded locally before being run on $CF
21ssh $CF <<EOF
22PATH=$PATH
23[[ ! -d $IN ]] && mkdir -p $IN
24cd ${IN}
25if [[ -d $PROJECT ]] ; then
26 cd $PROJECT
27 rm -f configure.in
28 cvs update
29else
30 cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/nagiosplug co nagiosplug
31 cd $PROJECT
32fi
33
34sed 's/^VER=.*/VER=${DS}/;s/^REL=.*/REL=snapshot/' configure.in > configure.tmp
35mv configure.tmp configure.in
36aclocal
37autoheader
38autoconf
39automake
40autoreconf
41
42# Make the Nagiosplug dist tarball
43./configure
44make dist
45
46# End ssh
47EOF
48
49# Check for *.gz files locally (expect NFS between cf shell server and $CF)
50set -x
51cd $IN/$PROJECT
52ls *.gz > /dev/null 2>&1 || die "No file created"
53ssh $OUT_SERVER "rm -f $OUT/*.gz"
54scp *.gz $OUT_SERVER:$OUT
55rm -f *.gz
56