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 fix


Correctly process new non-HTML files by always copying them.

Thanks to Jason M. for the reminder! This should fix the problem Greg
McGary has been experiencing.

Installed.

Gerald

Index: preprocess
===================================================================
RCS file: /cvs/gcc/wwwdocs/bin/preprocess,v
retrieving revision 1.12
diff -c -3 -p -r1.12 preprocess
*** preprocess	2000/04/05 18:39:45	1.12
--- preprocess	2000/08/01 11:14:06
*************** copy_if_different()
*** 49,58 ****
      s=$1
      d=$2
  
!     cmp $s $d >/dev/null
!     if [ $? -eq 1 ]; then
!         echo "  Copying $s";
          cp $s $d
      fi
  }
  
--- 49,63 ----
      s=$1
      d=$2
  
!     if [ ! -f $d ]; then
!         echo "  New file $s"
          cp $s $d
+     else
+         cmp $s $d >/dev/null
+         if [ $? -eq 1 ]; then
+             echo "  Copying $s";
+             cp $s $d
+         fi
      fi
  }
  


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