update_web_docs_libstdcxx_git 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/bin/bash
  2. # "sh update_web_docs_libstdcxx_git"
  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. GITROOT=${GITROOT:-"/git/gcc.git"}
  9. GETTHIS='libstdc++-v3/doc/html'
  10. WWWDIR=/www/gcc/htdocs/onlinedocs/libstdc++
  11. #WWWDIR=/tmp/fake-onlinedocs-testing
  12. ## No more changes should be needed. Ha, right, whatever.
  13. #####################################################################
  14. FILTER="newer or same age version exists|0 blocks"
  15. PATH=/usr/local/bin:$PATH
  16. export GITROOT
  17. test -d $WWWDIR || /bin/mkdir $WWWDIR
  18. test -d $WWWDIR || { echo something is very wrong ; exit 1; }
  19. WORKDIR=/tmp/v3-doc-update.$$
  20. /bin/rm -rf $WORKDIR
  21. /bin/mkdir $WORKDIR
  22. cd $WORKDIR
  23. # checkout all the HTML files, get down into an interesting directory
  24. git -C $GITROOT archive master $GETTHIS | tar xf -
  25. cd $GETTHIS
  26. # copy the tree to the onlinedocs area, preserve directory structure
  27. find . -depth -print | cpio -pd $WWWDIR 2>&1 | egrep -v "$FILTER"
  28. err=${PIPESTATUS[1]}
  29. if [ $err -gt 0 ]; then
  30. printf "\nCopying failed with error code %d.\n" $err
  31. fi
  32. cd /
  33. /bin/rm -rf $WORKDIR