snapshot 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #! /bin/sh
  2. # This scipt assumes that you have anonCVS for nagios and nagiosplug
  3. # in ${IN}
  4. # Set directories
  5. IN=${HOME}/sf
  6. OUT=/col/htdocs/src/nagios
  7. RPM_TOPDIR=${HOME}/redhat
  8. # Update nagiosplug CVS
  9. cd ${IN}/nagiosplug
  10. rm configure configure.in Makefile.in
  11. cvs update
  12. DS=`date -u +%Y%m%d%H%M`
  13. sed "s/^VER=.*/VER=${DS}/;s/^REL=.*/REL=snapshot/" configure.in > configure.tmp
  14. mv configure.tmp configure.in
  15. aclocal
  16. autoheader
  17. autoconf
  18. automake
  19. autoreconf
  20. # Make the Nagiosplug dist tarball
  21. rm -r build-dist
  22. mkdir build-dist
  23. cd build-dist
  24. ../configure
  25. make dist
  26. cp -fv *.gz ${OUT}
  27. # Make the Nagiosplug custom RPM
  28. echo "%_topdir ${RPM_TOPDIR}" > ./.rpmrc
  29. rpm --rcfile "/usr/lib/rpm/rpmrc:/etc/rpmrc:~/.rpmrc:./.rpmrc" \
  30. --define 'custom 1' -ta *.gz
  31. cp -fv ~/redhat/RPMS/i386/nagios-plugins-custom-*.i386.rpm /col/htdocs/src/nagios
  32. # Copy the new snapshot and delete the old ones
  33. cd ${OUT}
  34. GLOBIGNORE=nagios-plugins-${DS}-snapshot.tar.gz
  35. rm -f nagios-plugins-*.tar.gz
  36. GLOBIGNORE=nagios-plugins-custom-${DS}-snapshot.i386.rpm
  37. rm -f nagios-plugins-custom-*-snapshot.i386.rpm
  38. cd ~/redhat/SRPMS
  39. rm nagios-plugins-custom-${DS}-snapshot.src.rpm
  40. cd ~/redhat/RPMS/i386
  41. rm nagios-plugins-custom-${DS}-snapshot.i386.rpm
  42. # Update Nagios CVS
  43. cd ${IN}/sf/nagios
  44. rm configure configure.in nagios.spec base/nagios.c common/common.h \
  45. html/main.html Makefile.in
  46. cvs update
  47. # Make the Nagios tarball
  48. DS=`date -u +%Y%m%d%H%M`
  49. ./make-tarball ${DS}
  50. # Copy the new snapshot and delete the old ones
  51. mv ../nagios-${DS}.tar.gz /col/htdocs/src/nagios/
  52. GLOBIGNORE=${OUT}/nagios-${DS}.tar.gz
  53. rm ${OUT}/nagios-20*.tar.gz