Thread: [Phpfreechat-svn] SF.net SVN: phpfreechat: [563] trunk/misc/checkmd5
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-06-11 21:23:58
|
Revision: 563 Author: kerphi Date: 2006-06-11 14:23:50 -0700 (Sun, 11 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=563&view=rev Log Message: ----------- script used to generate a md5 checker in php Added Paths: ----------- trunk/misc/checkmd5 Added: trunk/misc/checkmd5 =================================================================== --- trunk/misc/checkmd5 (rev 0) +++ trunk/misc/checkmd5 2006-06-11 21:23:50 UTC (rev 563) @@ -0,0 +1,12 @@ +cd .. +echo "<?php" +for f in `find . -name "*.php"` +do + sum=`md5sum $f | sed "s/\s.*$//g"` + echo 'if (md5(file_get_contents("'$f'")) == "'$sum'")' + echo ' echo "ok - '$f'\n";' + echo 'else' + echo ' echo "corrupted - '$f' (please replace this file by a correct one)\n";' +done +echo "?>" +cd - Property changes on: trunk/misc/checkmd5 ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-07-07 07:09:30
|
Revision: 646 Author: kerphi Date: 2006-07-07 00:09:22 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=646&view=rev Log Message: ----------- Show the corrupted files at the beginning of the list Modified Paths: -------------- trunk/misc/checkmd5 Modified: trunk/misc/checkmd5 =================================================================== --- trunk/misc/checkmd5 2006-07-07 06:57:56 UTC (rev 645) +++ trunk/misc/checkmd5 2006-07-07 07:09:22 UTC (rev 646) @@ -27,16 +27,21 @@ cd $PFC_PATH echo "<?php" > $TMP -echo 'echo "<h2>Checking phpfreechat files validity</h2>";' >> $TMP -echo 'echo "<pre>\n";' >> $TMP +echo '$files_ok = array();' >> $TMP +echo '$files_ko = array();' >> $TMP for f in `find . -type f` do sum=`md5sum $f | sed "s/\s.*$//g"` echo 'if (md5(file_get_contents("'$f'")) == "'$sum'")' >> $TMP - echo ' echo "<span style=\"color:#3A3\">ok - '$f'</span>\n";' >> $TMP + echo ' $files_ok[] = "<span style=\"color:#3A3\">ok - '$f'</span>\n";' >> $TMP echo 'else' >> $TMP - echo ' echo "<span style=\"color:#F33\">corrupted - '$f' (please replace this file by a correct one)</span>\n";' >> $TMP + echo ' $files_ko[] = "<span style=\"color:#F33\">corrupted - '$f' (please replace this file by a correct one)</span>\n";' >> $TMP done + +echo 'echo "<h2>Checking phpfreechat files validity</h2>";' >> $TMP +echo 'echo "<pre>\n";' >> $TMP +echo 'foreach(array_merge($files_ko,$files_ok as $file);' >> $TMP +echo ' echo $file;' >> $TMP echo 'echo "</pre>\n";' >> $TMP echo "?>" >> $TMP cd - >/dev/null This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-07-07 07:42:28
|
Revision: 649 Author: kerphi Date: 2006-07-07 00:42:21 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=649&view=rev Log Message: ----------- fix a syntax error Modified Paths: -------------- trunk/misc/checkmd5 Modified: trunk/misc/checkmd5 =================================================================== --- trunk/misc/checkmd5 2006-07-07 07:40:20 UTC (rev 648) +++ trunk/misc/checkmd5 2006-07-07 07:42:21 UTC (rev 649) @@ -40,7 +40,7 @@ echo 'echo "<h2>Checking phpfreechat files validity</h2>";' >> $TMP echo 'echo "<pre>\n";' >> $TMP -echo 'foreach(array_merge($files_ko,$files_ok as $file);' >> $TMP +echo 'foreach(array_merge($files_ko,$files_ok) as $file);' >> $TMP echo ' echo $file;' >> $TMP echo 'echo "</pre>\n";' >> $TMP echo "?>" >> $TMP This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-07-07 07:46:20
|
Revision: 650 Author: kerphi Date: 2006-07-07 00:46:15 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=650&view=rev Log Message: ----------- merge the array before the loop Modified Paths: -------------- trunk/misc/checkmd5 Modified: trunk/misc/checkmd5 =================================================================== --- trunk/misc/checkmd5 2006-07-07 07:42:21 UTC (rev 649) +++ trunk/misc/checkmd5 2006-07-07 07:46:15 UTC (rev 650) @@ -40,7 +40,8 @@ echo 'echo "<h2>Checking phpfreechat files validity</h2>";' >> $TMP echo 'echo "<pre>\n";' >> $TMP -echo 'foreach(array_merge($files_ko,$files_ok) as $file);' >> $TMP +echo '$arr = array_merge($files_ko,$files_ok);' >> $TMP +echo 'foreach($arr as $file);' >> $TMP echo ' echo $file;' >> $TMP echo 'echo "</pre>\n";' >> $TMP echo "?>" >> $TMP This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-07-07 07:48:52
|
Revision: 651 Author: kerphi Date: 2006-07-07 00:48:48 -0700 (Fri, 07 Jul 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=651&view=rev Log Message: ----------- oups, another stupide syntaxe error Modified Paths: -------------- trunk/misc/checkmd5 Modified: trunk/misc/checkmd5 =================================================================== --- trunk/misc/checkmd5 2006-07-07 07:46:15 UTC (rev 650) +++ trunk/misc/checkmd5 2006-07-07 07:48:48 UTC (rev 651) @@ -41,7 +41,7 @@ echo 'echo "<h2>Checking phpfreechat files validity</h2>";' >> $TMP echo 'echo "<pre>\n";' >> $TMP echo '$arr = array_merge($files_ko,$files_ok);' >> $TMP -echo 'foreach($arr as $file);' >> $TMP +echo 'foreach($arr as $file)' >> $TMP echo ' echo $file;' >> $TMP echo 'echo "</pre>\n";' >> $TMP echo "?>" >> $TMP This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-09-03 13:36:36
|
Revision: 729 http://svn.sourceforge.net/phpfreechat/?rev=729&view=rev Author: kerphi Date: 2006-09-03 06:34:14 -0700 (Sun, 03 Sep 2006) Log Message: ----------- do not add the index.php file into checkmd5 Modified Paths: -------------- trunk/misc/checkmd5 Modified: trunk/misc/checkmd5 =================================================================== --- trunk/misc/checkmd5 2006-09-03 09:18:13 UTC (rev 728) +++ trunk/misc/checkmd5 2006-09-03 13:34:14 UTC (rev 729) @@ -31,11 +31,14 @@ echo '$files_ko = array();' >> $TMP for f in `find . -type f` do - sum=`md5sum $f | sed "s/\s.*$//g"` - echo 'if (md5(file_get_contents("'$f'")) == "'$sum'")' >> $TMP - echo ' $files_ok[] = "<span style=\"color:#3A3\">ok - '$f'</span>\n";' >> $TMP - echo 'else' >> $TMP - echo ' $files_ko[] = "<span style=\"color:#F33\">corrupted - '$f' (please replace this file by a correct one)</span>\n";' >> $TMP + if ( test $f != "./index.php" ) + then + sum=`md5sum $f | sed "s/\s.*$//g"` + echo 'if (md5(file_get_contents("'$f'")) == "'$sum'")' >> $TMP + echo ' $files_ok[] = "<span style=\"color:#3A3\">ok - '$f'</span>\n";' >> $TMP + echo 'else' >> $TMP + echo ' $files_ko[] = "<span style=\"color:#F33\">corrupted - '$f' (please replace this file by a correct one)</span>\n";' >> $TMP + fi done echo 'echo "<h2>Checking phpfreechat files validity</h2>";' >> $TMP This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-03-13 13:00:50
|
Revision: 1000 http://svn.sourceforge.net/phpfreechat/?rev=1000&view=rev Author: kerphi Date: 2007-03-13 06:00:51 -0700 (Tue, 13 Mar 2007) Log Message: ----------- rename version to version.txt Modified Paths: -------------- trunk/misc/checkmd5 Modified: trunk/misc/checkmd5 =================================================================== --- trunk/misc/checkmd5 2007-03-13 13:00:11 UTC (rev 999) +++ trunk/misc/checkmd5 2007-03-13 13:00:51 UTC (rev 1000) @@ -17,9 +17,9 @@ exit; fi -if ( test ! -f $PFC_PATH/version ) +if ( test ! -f $PFC_PATH/version.txt ) then - echo "$PFC_PATH/version doesn't exist." + echo "$PFC_PATH/version.txt doesn't exist." exit; fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |