update_web_docs_libstdcxx_svn 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/bash
  2. # "sh update_web_docs_libstdcxx.sh"
  3. # Checks out a copy of the libstdc++-v3 "inner" documentation and puts
  4. # it in the onlinedocs area. For an initial description of "inner"
  5. # docs, see the thread starting with
  6. # http://gcc.gnu.org/ml/libstdc++/2000-11/msg00475.html
  7. #
  8. # Id: update_v3_web_docs.sh,v 1.4 2000/12/25 05:02:14 pedwards Exp
  9. #####################################################################
  10. SVNROOT=${SVNROOT:-"file:///svn/gcc"}
  11. GETTHIS='libstdc++-v3/doc/html'
  12. WWWDIR=/www/gcc/htdocs/onlinedocs/libstdc++
  13. #WWWDIR=/tmp/fake-onlinedocs-testing
  14. ## No more changes should be needed. Ha, right, whatever.
  15. #####################################################################
  16. FILTER="newer or same age version exists|0 blocks"
  17. PATH=/usr/local/bin:$PATH
  18. export SVNROOT
  19. test -d $WWWDIR || /bin/mkdir $WWWDIR
  20. test -d $WWWDIR || { echo something is very wrong ; exit 1; }
  21. WORKDIR=/tmp/v3-doc-update.$$
  22. /bin/rm -rf $WORKDIR
  23. /bin/mkdir $WORKDIR
  24. cd $WORKDIR
  25. # checkout all the HTML files, get down into an interesting directory
  26. svn -q export $SVNROOT/trunk/$GETTHIS doc
  27. cd doc
  28. rm -f Makefile
  29. # copy the tree to the onlinedocs area, preserve directory structure
  30. find . -depth -print | cpio -pd $WWWDIR 2>&1 | egrep -v "$FILTER"
  31. err=${PIPESTATUS[1]}
  32. if [ $err -gt 0 ]; then
  33. printf "\nCopying failed with error code %d.\n" $err
  34. fi
  35. cd /
  36. /bin/rm -rf $WORKDIR