sfwebcron 707 B

1234567891011121314151617181920212223242526272829
  1. #! /bin/bash
  2. # sfwebcron
  3. # To update the developers-guidelines.html and put in html area
  4. #
  5. # Install in cron with something like:
  6. # 47 7 * * * $HOME/bin/sfwebcron
  7. function die { echo $1; exit 1; }
  8. # Set working variables
  9. PROJECT=nagiosplug
  10. IN=${HOME}/tmp_sfwebcron
  11. OUT="/home/groups/n/na/nagiosplug/htdocs"
  12. # Get latest dev guildelines
  13. [[ ! -d $IN ]] && mkdir $IN
  14. cd $IN
  15. if [[ ! -d $PROJECT ]] ; then
  16. cvs -z3 -d:pserver:anonymous@cvs1:/cvsroot/nagiosplug co nagiosplug || die "Cannot cvs"
  17. fi
  18. cd nagiosplug/doc
  19. cvs update
  20. # Is the dev guidelines updated?
  21. make
  22. if [[ developer-guidelines.html -nt $OUT/developer-guidelines.html ]] ; then
  23. cp developer-guidelines.html developer-guidelines.sgml $OUT
  24. fi