7 PATH=/usr/local/bin:$PATH
8 WWWBASE=/www/gcc/htdocs
10 WORKDIR=/tmp/gcc-doc-update.$$
16 # Find all the texi files in the repository, except those in directories
17 # we do not care about (Attic, texinfo, etc).
18 find $CVSROOT/gcc -name \*.texi,v -print | fgrep -v -f/home/gccadmin/scripts/doc_exclude | sed -e s#$CVSROOT/##g -e s#,v##g > FILES
21 # Checkout all the texi files and get them into a single directory.
22 # If we ever have texi files with the same name we'll have to do this
25 mv `find . -name \*.texi -print` .
27 # Now convert the relavent files from texi to html
28 for file in c-tree cpp chill gcc gcov gxxint g77 iostream objc-features; do
29 /usr/local/bin/texi2html -glossary -menu -split_chapter ${file}.texi
32 # Then build a gzipped copy of each of the resulting .html files
33 for file in *.html; do
34 cat $file | gzip --best > $file.gz
37 news_file=`grep "News About GNU Fortran" $WWWBASE/onlinedocs/g77_toc.html | sed -e '/HREF=.*[^.]/ s#^.*HREF="##g' | sed -e 's%#SEC.*%%g'`
38 bugs_file=`grep "Known Causes of Trouble with GNU Fortran" $WWWBASE/onlinedocs/g77_toc.html | sed -e '/HREF=.*[^.]/ s#^.*HREF="##g' | sed -e 's%#SEC.*%%g'`
39 contrib_file=`grep "Contributors to GCC" $WWWBASE/onlinedocs/gcc_toc.html | sed -e '/HREF=.*[^.]/ s#^.*HREF="##g' | sed -e 's%#SEC.*%%g'`
41 # On the 15th of the month, wipe all the old files from the
44 if test $today = 15; then
45 find $WWWBASE/onlinedocs -type f -print | grep -v index.html | xargs rm
48 # And copy the resulting html files to the web server
49 for file in *.html; do
50 cat $WWWBASE/onlinedocs/$file |
51 sed -e '/^This document was generated on/d' \
52 -e '/^<!-- Created by texi/d' > file1
54 sed -e '/^This document was generated on/d' \
55 -e '/^<!-- Created by texi/d' > file2
56 if cmp -s file1 file2; then
59 cp $file ${file}.gz $WWWBASE/onlinedocs
63 cd $WWWBASE/onlinedocs
67 rm -f g77_news.html.gz
68 rm -f g77_bugs.html.gz
69 ln $news_file g77_news.html
70 ln $bugs_file g77_bugs.html
71 ln ${news_file}.gz g77_news.html.gz
72 ln ${bugs_file}.gz g77_bugs.html.gz
77 ln onlinedocs/$contrib_file thanks.html
78 ln onlinedocs/${contrib_file}.gz thanks.html.gz