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


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.


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