From ee3a73bc338f3b763b5797bc90ca0c026d6504ce Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Tue, 4 Mar 2003 23:35:37 +0000 Subject: To create nagiosplug daily snapshots on SF git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@363 f882894a-f735-0410-b71e-b25c423dba1c --- tools/sfsnapshot | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100755 tools/sfsnapshot diff --git a/tools/sfsnapshot b/tools/sfsnapshot new file mode 100755 index 00000000..47421af4 --- /dev/null +++ b/tools/sfsnapshot @@ -0,0 +1,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 < 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 + -- cgit v1.2.3