sfwebcron 915 B

1234567891011121314151617181920212223242526272829303132333435
  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_SERVER="tonvoon@shell.sf.net"
  12. OUT="/home/groups/n/na/nagiosplug/htdocs"
  13. if [[ ! -e developer-guidelines.html.last ]] ; then
  14. touch developer-guidelines.html.last
  15. fi
  16. # Get latest dev guildelines
  17. [[ ! -d $IN ]] && mkdir $IN
  18. cd $IN
  19. if [[ ! -d doc ]] ; then
  20. #cvs -z3 -d:pserver:anonymous@cvs1:/cvsroot/nagiosplug co nagiosplug || die "Cannot cvs"
  21. svn checkout http://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk/doc doc
  22. fi
  23. cd doc
  24. svn update
  25. make
  26. if [[ developer-guidelines.html -nt developer-guidelines.html.last ]] ; then
  27. scp developer-guidelines.{html,sgml} $OUT_SERVER:$OUT
  28. touch developer-guidelines.html.last
  29. fi