[Mapbender-commits] r2728 - branches/spsneo_dev/build
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Sat Jul 26 04:26:13 EDT 2008
Author: spsneo
Date: 2008-07-26 04:26:12 -0400 (Sat, 26 Jul 2008)
New Revision: 2728
Modified:
branches/spsneo_dev/build/checksum-utils.inc
Log:
Function to scan and create json files
Modified: branches/spsneo_dev/build/checksum-utils.inc
===================================================================
--- branches/spsneo_dev/build/checksum-utils.inc 2008-07-26 08:25:51 UTC (rev 2727)
+++ branches/spsneo_dev/build/checksum-utils.inc 2008-07-26 08:26:12 UTC (rev 2728)
@@ -22,16 +22,14 @@
$directory = dir($dir_path);
while(false !== ($file = $directory->read())) {
$file_path = $dir_path.'/'.$file;
- if(is_file($file_path)) {
+ if(is_file($file_path) && $file != 'checksum.json' && !preg_match("/~$/", $file) && !preg_match("/^\./", $file)) {
if(is_readable($file_path)) {
- if($file != 'checksum.json'){
- $file_arr[$file] = sha1_file($file_path);
- }
+ $file_arr[$file] = sha1_file($file_path);
} else {
echo $file_path." is not readable.\nPlease make sure you have privelege to build.\nAborting...";
exit();
}
- } else if (is_dir($file_path)) {
+ } else if (is_dir($file_path) && !preg_match("/^\./", $file)) {
if($file != '.' && $file != '..' ) {
//echo "Scanning directory: ".$file_path."\n";
build_checksum($file_path);
More information about the Mapbender_commits
mailing list