diff options
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2002-11-24 13:09:40 +0000 |
---|---|---|
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2002-11-24 13:09:40 +0000 |
commit | 8f8e21ba6cef71730dbec0c10ac229895cfd498a (patch) | |
tree | 34d8e29bbbd08489dff0a5998048e95f3347622b | |
parent | 63ac65ccb855786a489f40e72dd1a7f678f7e03e (diff) | |
download | monitoring-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
-rwxr-xr-x | tools/snapshot | 63 |
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 @@ +#! /bin/sh + +# This scipt assumes that you have anonCVS for nagios and nagiosplug +# in ${IN} + +# Set directories +IN=${HOME}/sf +OUT=/col/htdocs/src/nagios +RPM_TOPDIR=${HOME}/redhat + +# Update nagiosplug CVS +cd ${IN}/nagiosplug +rm configure configure.in Makefile.in +cvs update +DS=`date -u +%Y%m%d%H%M` +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 +rm -r build-dist +mkdir build-dist +cd build-dist +../configure +make dist +cp -fv *.gz ${OUT} + +# Make the Nagiosplug custom RPM +echo "%_topdir ${RPM_TOPDIR}" > ./.rpmrc +rpm --rcfile "/usr/lib/rpm/rpmrc:/etc/rpmrc:~/.rpmrc:./.rpmrc" \ + --define 'custom 1' -ta *.gz +cp -fv ~/redhat/RPMS/i386/nagios-plugins-custom-*.i386.rpm /col/htdocs/src/nagios + +# Copy the new snapshot and delete the old ones +cd ${OUT} +GLOBIGNORE=nagios-plugins-${DS}-snapshot.tar.gz +rm -f nagios-plugins-*.tar.gz +GLOBIGNORE=nagios-plugins-custom-${DS}-snapshot.i386.rpm +rm -f nagios-plugins-custom-*-snapshot.i386.rpm +cd ~/redhat/SRPMS +rm nagios-plugins-custom-${DS}-snapshot.src.rpm +cd ~/redhat/RPMS/i386 +rm nagios-plugins-custom-${DS}-snapshot.i386.rpm + +# Update Nagios CVS +cd ${IN}/sf/nagios +rm configure configure.in nagios.spec base/nagios.c common/common.h \ + html/main.html Makefile.in +cvs update + +# Make the Nagios tarball +DS=`date -u +%Y%m%d%H%M` +./make-tarball ${DS} + +# Copy the new snapshot and delete the old ones +mv ../nagios-${DS}.tar.gz /col/htdocs/src/nagios/ +GLOBIGNORE=${OUT}/nagios-${DS}.tar.gz +rm ${OUT}/nagios-20*.tar.gz + |