This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH: wwwdocs/bin/preprocess


And on we go...

  Remove some debugging output and a FIXME. Add macro STYLE. Use it.
  Only update pages whose contents has actually changed.

Installed.

Gerald

Index: preprocess
===================================================================
RCS file: /cvs/gcc/wwwdocs/bin/preprocess,v
retrieving revision 1.2
diff -c -3 -p -r1.2 preprocess
*** preprocess	2000/01/06 22:00:57	1.2
--- preprocess	2000/01/19 01:16:54
*************** MHC=${MHC-/usr/local/bin/mhc}
*** 13,18 ****
--- 13,20 ----
  SOURCETREE=${SOURCETREE-/www/gcc/htdocs-preformatted}
  DESTTREE=${DESTTREE-/www/gcc/htdocs}
  
+ STYLE=$SOURCETREE/style.mhtml
+ 
  ####
  # Various safety check first. 
  
*************** fi
*** 31,38 ****
  
  TMPDIR=/tmp/$0.$$
  
- echo "Using $TMPDIR"
- 
  cleanup() {
      rm -rf $TMPDIR $1
  }
--- 33,38 ----
*************** for f in `find . \( -name CVS -prune \) 
*** 57,63 ****
          */CVS)
              ;;
          *.html)
!             ${MHC} $f > $DESTTREE/$f
              ;;
          *\.txt|*\.ps|*\.pdf|*\.jpg|*\.jpeg|*\.png|*/fsf-forms/*|*\.patch)
              cp $f $DESTTREE/$f      
--- 57,71 ----
          */CVS)
              ;;
          *.html)
!             # Prepend the MetaHTML style and process the page.
!             cat $STYLE $f > $TMPDIR/input
!             ${MHC} $TMPDIR/input > $TMPDIR/output
!             # Update the page only if there is a change.
!             diff $TMPDIR/output $DESTTREE/$f >/dev/null
!             if [ $? -ne 0 ]; then
!                 echo "  Updating $f"
!                 cp $TMPDIR/output $DESTTREE/$f
!             fi
              ;;
          *\.txt|*\.ps|*\.pdf|*\.jpg|*\.jpeg|*\.png|*/fsf-forms/*|*\.patch)
              cp $f $DESTTREE/$f      
*************** for f in `find . \( -name CVS -prune \) 
*** 70,79 ****
              cp $f $DESTTREE/$f      
              ;;
      esac
- 
- # FIXME: In the long term we'll want the following:
- #          if ./$x newer than wwwdocs.ontheweb/$x 
- #             || MetaHTML-style-file newer than wwwdocs.ontheweb/$x then
- #                  mhc ./$x > wwwdocs.ontheweb/$x
  
  done
--- 78,82 ----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]