5 if (array_pop(explode('/', $cwd)) !== 'roojs1') {
6 echo "this should be run in roojs1 directory...\n";
10 ini_set('include_path',
11 dirname(__FILE__) . '/../:' .
12 dirname(__FILE__) . '/../../pear:' .
13 ini_get('include_path')
16 $rootDir = dirname(__FILE__) . '/../..';
21 'directory' => "{$rootDir}/roojs1/less/bootstrap",
25 'directory' => "{$rootDir}/roojs1/css-bootstrap/",
31 'directory' => "{$rootDir}/roojs1/less/roojs-bootstrap",
32 'name' => 'roojs-bootstrap'
35 'directory' => "{$rootDir}/roojs1/css-bootstrap/",
36 'name' => 'roojs-bootstrap'
43 require_once 'HTML/Less.php';
45 $less = new HTML_Less();
47 require_once 'HTML/CSS/Minify.php';
49 $minify = new HTML_CSS_Minify();
51 foreach ($files as $less => $file){
53 if(!file_exists($less)){
54 echo "{$less} does not exist...\n";
62 $css = "{$file['directory']}{$file['name']}.css";
64 echo "Compiling - {$less} To {$css}\n";
66 $less->compileFile($less, $css);
68 if(!file_exists($css)){
69 echo "Compile failed?!\n";
76 } catch (Exception $ex) {
77 echo "lessphp fatal error: {$ex->getMessage()}\n";