diff options
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2002-11-24 13:09:40 (GMT) |
---|---|---|
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2002-11-24 13:09:40 (GMT) |
commit | 8f8e21ba6cef71730dbec0c10ac229895cfd498a (patch) | |
tree | 34d8e29bbbd08489dff0a5998048e95f3347622b /tools | |
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
Diffstat (limited to 'tools')
-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 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 | ||
7 | IN=${HOME}/sf | ||
8 | OUT=/col/htdocs/src/nagios | ||
9 | RPM_TOPDIR=${HOME}/redhat | ||
10 | |||
11 | # Update nagiosplug CVS | ||
12 | cd ${IN}/nagiosplug | ||
13 | rm configure configure.in Makefile.in | ||
14 | cvs update | ||
15 | DS=`date -u +%Y%m%d%H%M` | ||
16 | sed "s/^VER=.*/VER=${DS}/;s/^REL=.*/REL=snapshot/" configure.in > configure.tmp | ||
17 | mv configure.tmp configure.in | ||
18 | aclocal | ||
19 | autoheader | ||
20 | autoconf | ||
21 | automake | ||
22 | autoreconf | ||
23 | |||
24 | # Make the Nagiosplug dist tarball | ||
25 | rm -r build-dist | ||
26 | mkdir build-dist | ||
27 | cd build-dist | ||
28 | ../configure | ||
29 | make dist | ||
30 | cp -fv *.gz ${OUT} | ||
31 | |||
32 | # Make the Nagiosplug custom RPM | ||
33 | echo "%_topdir ${RPM_TOPDIR}" > ./.rpmrc | ||
34 | rpm --rcfile "/usr/lib/rpm/rpmrc:/etc/rpmrc:~/.rpmrc:./.rpmrc" \ | ||
35 | --define 'custom 1' -ta *.gz | ||
36 | cp -fv ~/redhat/RPMS/i386/nagios-plugins-custom-*.i386.rpm /col/htdocs/src/nagios | ||
37 | |||
38 | # Copy the new snapshot and delete the old ones | ||
39 | cd ${OUT} | ||
40 | GLOBIGNORE=nagios-plugins-${DS}-snapshot.tar.gz | ||
41 | rm -f nagios-plugins-*.tar.gz | ||
42 | GLOBIGNORE=nagios-plugins-custom-${DS}-snapshot.i386.rpm | ||
43 | rm -f nagios-plugins-custom-*-snapshot.i386.rpm | ||
44 | cd ~/redhat/SRPMS | ||
45 | rm nagios-plugins-custom-${DS}-snapshot.src.rpm | ||
46 | cd ~/redhat/RPMS/i386 | ||
47 | rm nagios-plugins-custom-${DS}-snapshot.i386.rpm | ||
48 | |||
49 | # Update Nagios CVS | ||
50 | cd ${IN}/sf/nagios | ||
51 | rm configure configure.in nagios.spec base/nagios.c common/common.h \ | ||
52 | html/main.html Makefile.in | ||
53 | cvs update | ||
54 | |||
55 | # Make the Nagios tarball | ||
56 | DS=`date -u +%Y%m%d%H%M` | ||
57 | ./make-tarball ${DS} | ||
58 | |||
59 | # Copy the new snapshot and delete the old ones | ||
60 | mv ../nagios-${DS}.tar.gz /col/htdocs/src/nagios/ | ||
61 | GLOBIGNORE=${OUT}/nagios-${DS}.tar.gz | ||
62 | rm ${OUT}/nagios-20*.tar.gz | ||
63 | |||