summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>2002-11-24 13:09:40 (GMT)
committerKarl DeBisschop <kdebisschop@users.sourceforge.net>2002-11-24 13:09:40 (GMT)
commit8f8e21ba6cef71730dbec0c10ac229895cfd498a (patch)
tree34d8e29bbbd08489dff0a5998048e95f3347622b /tools
parent63ac65ccb855786a489f40e72dd1a7f678f7e03e (diff)
downloadmonitoring-plugins-8f8e21ba6cef71730dbec0c10ac229895cfd498a.tar.gz
make routine snapshots of nagios and plugin CVS to expand testing
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@226 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'tools')
-rwxr-xr-xtools/snapshot63
1 files changed, 63 insertions, 0 deletions
diff --git a/tools/snapshot b/tools/snapshot
new file mode 100755
index 0000000..beeb4a8
--- /dev/null
+++ b/tools/snapshot
@@ -0,0 +1,63 @@
1#! /bin/sh
2
3# This scipt assumes that you have anonCVS for nagios and nagiosplug
4# in ${IN}
5
6# Set directories
7IN=${HOME}/sf
8OUT=/col/htdocs/src/nagios
9RPM_TOPDIR=${HOME}/redhat
10
11# Update nagiosplug CVS
12cd ${IN}/nagiosplug
13rm configure configure.in Makefile.in
14cvs update
15DS=`date -u +%Y%m%d%H%M`
16sed "s/^VER=.*/VER=${DS}/;s/^REL=.*/REL=snapshot/" configure.in > configure.tmp
17mv configure.tmp configure.in
18aclocal
19autoheader
20autoconf
21automake
22autoreconf
23
24# Make the Nagiosplug dist tarball
25rm -r build-dist
26mkdir build-dist
27cd build-dist
28../configure
29make dist
30cp -fv *.gz ${OUT}
31
32# Make the Nagiosplug custom RPM
33echo "%_topdir ${RPM_TOPDIR}" > ./.rpmrc
34rpm --rcfile "/usr/lib/rpm/rpmrc:/etc/rpmrc:~/.rpmrc:./.rpmrc" \
35 --define 'custom 1' -ta *.gz
36cp -fv ~/redhat/RPMS/i386/nagios-plugins-custom-*.i386.rpm /col/htdocs/src/nagios
37
38# Copy the new snapshot and delete the old ones
39cd ${OUT}
40GLOBIGNORE=nagios-plugins-${DS}-snapshot.tar.gz
41rm -f nagios-plugins-*.tar.gz
42GLOBIGNORE=nagios-plugins-custom-${DS}-snapshot.i386.rpm
43rm -f nagios-plugins-custom-*-snapshot.i386.rpm
44cd ~/redhat/SRPMS
45rm nagios-plugins-custom-${DS}-snapshot.src.rpm
46cd ~/redhat/RPMS/i386
47rm nagios-plugins-custom-${DS}-snapshot.i386.rpm
48
49# Update Nagios CVS
50cd ${IN}/sf/nagios
51rm configure configure.in nagios.spec base/nagios.c common/common.h \
52 html/main.html Makefile.in
53cvs update
54
55# Make the Nagios tarball
56DS=`date -u +%Y%m%d%H%M`
57./make-tarball ${DS}
58
59# Copy the new snapshot and delete the old ones
60mv ../nagios-${DS}.tar.gz /col/htdocs/src/nagios/
61GLOBIGNORE=${OUT}/nagios-${DS}.tar.gz
62rm ${OUT}/nagios-20*.tar.gz
63