$cwd = getcwd();
-if (array_pop(explode('/', $cwd)) !== 'roojs1') {
+$cc = explode('/', $cwd);
+if (array_pop($cc) !== 'roojs1') {
echo "this should be run in roojs1 directory...\n";
exit;
}
continue;
}
- $variable = "{$rootDir}/roojs1/less/bootstrap/variables.less";
+ $dir = "{$file['baseDir']}/{$file['sourceMapRootpath']}";
-}
+ $variable = "{$dir}variables.less";
+
+ if(file_exists($variable) && filemtime("{$dir}variables.less") > filemtime($css)){
+ continue;
+ }
+
+ $isLatest = true;
+
+ foreach(scandir($dir) as $f) {
+
+ if (!strlen($f) || $f[0] == '.') {
+ continue;
+ }
+
+ $less = "{$dir}{$f}";
+ if(filemtime($less) > filemtime($css)){
+ $isLatest = false;
+ break;
+ }
+ }
+
+ if($isLatest){
+ echo "{$css} already up-to-date \n";
+ unset($files[$src]);
+ }
+
+}
+
require_once 'HTML/Less.php';
foreach ($files as $src => $file){
} catch (Exception $ex) {
echo "lessphp fatal error: {$ex->getMessage()}\n";
}
-
}
\ No newline at end of file