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