sfwebcron 726 B

1234567891011121314151617181920212223242526272829303132
  1. #! /bin/bash
  2. # sfwebcron
  3. # To update the developers-guidelines.html and put in main 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/ton"
  12. DS=`date -u +%Y%m%d%H%M`
  13. # Get latest dev guildelines
  14. [[ ! -d $IN ]] && mkdir $IN
  15. cd $IN
  16. if [[ ! -d $PROJECT ]] ; then
  17. cvs -z3 -d:pserver:anonymous@cvs1:/cvsroot/nagiosplug co nagiosplug || die "Cannot cvs"
  18. fi
  19. cd nagiosplug/doc
  20. cvs update
  21. # Is the dev guidelines updated?
  22. touch now
  23. make
  24. if [[ developer-guidelines.html -nt now ]] ; then
  25. cp developer-guidelines.html developer-guidelines.sgml $OUT
  26. fi
  27. rm now