PATCH: wwwdocs/bin/preprocess

Gerald Pfeifer pfeifer@dbai.tuwien.ac.at
Thu Mar 16 15:27:00 GMT 2000


This introduces a small function copy_if_different() and uses it to
make the preprocessing (of full trees) more silent.

Installed.

Gerald

Index: preprocess
===================================================================
RCS file: /cvs/gcc/wwwdocs/bin/preprocess,v
retrieving revision 1.10
diff -c -3 -p -r1.10 preprocess
*** preprocess	2000/02/17 12:31:12	1.10
--- preprocess	2000/03/16 23:22:26
*************** trap "cleanup; exit 1" 1 2 15 
*** 44,49 ****
--- 44,61 ----
  ####
  # Process a single file.
  
+ copy_if_different()
+ {
+     s=$1
+     d=$2
+ 
+     cmp $s $d >/dev/null
+     if [ $? -eq 1 ]; then
+         echo "  Copying $s";
+         cp $s $d
+     fi
+ }
+ 
  process_file()
  {
      f=$1
*************** process_file()
*** 57,68 ****
          */CVS)
              ;;
          *egcs-1.?/*)
!             cp $f $DESTTREE/$f
!             echo "  Copying $f";
              ;;
          *\.txt|*\.ps|*\.pdf|*\.jpg|*\.jpeg|*\.png|*/fsf-forms/*|*\.patch)
!             cp $f $DESTTREE/$f
!             echo "  Copying binary $f";
              ;;
          *.html)
              # Prepend the MetaHTML style and process the page.
--- 69,78 ----
          */CVS)
              ;;
          *egcs-1.?/*)
!             copy_if_different $f $DESTTREE/$f
              ;;
          *\.txt|*\.ps|*\.pdf|*\.jpg|*\.jpeg|*\.png|*/fsf-forms/*|*\.patch)
!             copy_if_different $f $DESTTREE/$f
              ;;
          *.html)
              # Prepend the MetaHTML style and process the page.



More information about the Gcc-patches mailing list