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