summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
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 00000000..beeb4a8b
--- /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