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