Just looking at this script.
I notice that even when there is no physical change to a file (binary
comparison results in identical file), the script still says the file
was changed and a datetimestamp update is performed (I'm on windows).
This means that files metadata are altered when they shouldn't be.
Really minor patch. May be better ways ...
Index: fix-whitespace.php
===================================================================
RCS file: /repository/phpdoc/scripts/fix-whitespace.php,v
retrieving revision 1.1
diff -u -r1.1 fix-whitespace.php
--- fix-whitespace.php 22 Aug 2006 13:46:15 -0000 1.1
+++ fix-whitespace.php 22 Aug 2006 14:53:32 -0000
@@ -76,6 +76,8 @@
$tmp = '';
+ // Get a hash for the data that has been read.
+ $s_OrigMD5 = md5(implode('', $lines));
// start a state machine through the lines
@@ -207,7 +209,7 @@
} elseif (strlen($tmp) < 40) {
$log['error'][] = "ERROR: File ($file) is empty";
continue;
- } else {
+ } elseif (md5($tmp) !== $s_OrigMD5) {
$fp = fopen($fullpath_file, 'w');
if ($fp) {
if (fwrite($fp, $tmp)) {
-----Original Message-----
From: Etienne Kneuss [mailto:[EMAIL PROTECTED]
Sent: 22 August 2006 14:46
To: [email protected]
Subject: [PHP-DOC] cvs: phpdoc /scripts fix-whitespace.php
colder Tue Aug 22 13:46:15 2006 UTC
Added files:
/phpdoc/scripts fix-whitespace.php
Log:
Script fixing whitespaces issues to prepare the documentation to the
new style