diff options
author | xue <> | 2006-05-29 03:08:07 +0000 |
---|---|---|
committer | xue <> | 2006-05-29 03:08:07 +0000 |
commit | 2ea02214b2fb6bedb58dbbd318ef171a9e146524 (patch) | |
tree | 16b12d9f68986fe204900d1cee4914a0a4035a7b /buildscripts | |
parent | 8c1edb7f4eced999c9704ec9ff7ba11d88248bbd (diff) |
Merge from 3.0 branch till 1099.
Diffstat (limited to 'buildscripts')
-rw-r--r-- | buildscripts/jsbuilder/build.php | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/buildscripts/jsbuilder/build.php b/buildscripts/jsbuilder/build.php index 33e5d133..50fb8b56 100644 --- a/buildscripts/jsbuilder/build.php +++ b/buildscripts/jsbuilder/build.php @@ -22,11 +22,11 @@ /**
* The root directory for storing all source js files
*/
-define('SOURCE_DIR',realpath(dirname(__FILE__).'/../../framework/Web/JavaScripts'));
+define('SOURCE_DIR',realpath(dirname(__FILE__).'/../../framework/Web/Javascripts'));
/**
* The directory for storing compressed js files
*/
-define('TARGET_DIR',realpath(dirname(__FILE__).'/../../framework/Web/JavaScripts/js'));
+define('TARGET_DIR',realpath(dirname(__FILE__).'/../../framework/Web/Javascripts/js'));
/**
* Location of the perl JS doc generator.
*/
@@ -148,20 +148,20 @@ $builds = 0; /**
* loop through all target files and build them one by one
*/
-foreach($libraries as $libFile => $sourceFiles)
+foreach($libraries as $jsFile => $sourceFiles)
{
- if(!empty($requestedLibs) && !in_array($libFile,$requestedLibs))
+ if(!empty($requestedLibs) && !in_array($jsFile,$requestedLibs))
continue;
- $libFile=TARGET_DIR.'/'.$libFile;
- echo "\nBuilding $libFile...\n";
+ $libFile=TARGET_DIR.'/'.$jsFile;
+ echo "\nBuilding $jsFile...\n";
$contents='';
- foreach($sourceFiles as $sourceFile)
+ foreach($sourceFiles as $sourceJsFile)
{
- $sourceFile=SOURCE_DIR.'/'.$sourceFile;
+ $sourceFile=SOURCE_DIR.'/'.$sourceJsFile;
if(!is_file($sourceFile))
echo "Source file not found: $sourceFile\n";
- echo "...adding $sourceFile\n";
+ echo "...adding $sourceJsFile\n";
$contents.=file_get_contents($sourceFile)."\n\n";
}
$tempFile=$libFile.'.tmp';
@@ -170,10 +170,11 @@ foreach($libraries as $libFile => $sourceFiles) $jsMin -> minify();
unset($jsMin);
@unlink($tempFile);
- echo "Saving file {$libFile}\n";
+ echo "Saving file {$jsFile}\n";
$builds++;
}
-if(isset($argv[1]) && preg_match('/doc*/', $argv[1]))
+
+if(isset($argv[1]) && preg_match('/(doc)+/', $argv[1]))
{
$files = "";
foreach($libraries as $lib)
@@ -189,4 +190,4 @@ else if($builds > 0) else
echo "No files to build.";
-?>
\ No newline at end of file +?>
|