144743Smarkm#!/bin/bash 244743Smarkm 344743Smarkm 444743Smarkm# "sh update_web_docs_libstdcxx_git" 544743Smarkm# Checks out a copy of the libstdc++-v3 "inner" documentation and puts 644743Smarkm# it in the onlinedocs area. For an initial description of "inner" 744743Smarkm# docs, see the thread starting with 844743Smarkm# http://gcc.gnu.org/ml/libstdc++/2000-11/msg00475.html 944743Smarkm##################################################################### 1044743Smarkm 1144743SmarkmGITROOT=${GITROOT:-"/git/gcc.git"} 1244743SmarkmGETTHIS='libstdc++-v3/doc/html' 1344743SmarkmWWWDIR=/www/gcc/htdocs/onlinedocs/libstdc++ 1444743Smarkm#WWWDIR=/tmp/fake-onlinedocs-testing 1544743Smarkm 1644743Smarkm 1744743Smarkm## No more changes should be needed. Ha, right, whatever. 1844743Smarkm##################################################################### 1944743Smarkm 2044743SmarkmFILTER="newer or same age version exists|0 blocks" 2144743Smarkm 2244743SmarkmPATH=/usr/local/bin:$PATH 2344743Smarkmexport GITROOT 2444743Smarkm 2544743Smarkmtest -d $WWWDIR || /bin/mkdir $WWWDIR 2644743Smarkmtest -d $WWWDIR || { echo something is very wrong ; exit 1; } 2744743Smarkm 2844743SmarkmWORKDIR=/tmp/v3-doc-update.$$ 2944743Smarkm/bin/rm -rf $WORKDIR 3044743Smarkm/bin/mkdir $WORKDIR 3144743Smarkmcd $WORKDIR 3244743Smarkm 3344743Smarkm 3444743Smarkm# checkout all the HTML files, get down into an interesting directory 3544743Smarkmgit -C $GITROOT archive master $GETTHIS | tar xf - 3644743Smarkmcd $GETTHIS 3744743Smarkm 3844743Smarkm# copy the tree to the onlinedocs area, preserve directory structure 3944743Smarkmfind . -depth -print | cpio -pd $WWWDIR 2>&1 | egrep -v "$FILTER" 4044743Smarkm 4144743Smarkmerr=${PIPESTATUS[1]} 4244743Smarkmif [ $err -gt 0 ]; then 4344743Smarkm printf "\nCopying failed with error code %d.\n" $err 4444743Smarkmfi 4544743Smarkm 4644743Smarkmcd / 4744743Smarkm/bin/rm -rf $WORKDIR 4844743Smarkm 4944743Smarkm