X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=blobdiff_plain;f=JsCompile.php;h=c53bf6c6f8cd9119aa2a3df72f7a0a67c04c1920;hp=397178bd699d9f8d16e294b5491ee06c876f8a71;hb=HEAD;hpb=0a64957d456c85ba7f15d22816eb2656081e010f diff --git a/JsCompile.php b/JsCompile.php index 397178bd..089db58d 100644 --- a/JsCompile.php +++ b/JsCompile.php @@ -228,10 +228,7 @@ class Pman_Core_JsCompile extends Pman return false; } - $o = HTML_FlexyFramework::get()->Pman_Core; - if (isset($o['packseed'])) { - return $this->packSeed($files,$output,$translation_base); - } + // if packer is running, then dont compile - just output onebyone... require_once 'System.php'; @@ -255,6 +252,23 @@ class Pman_Core_JsCompile extends Pman return true; } + + + $pg = System::which('pgrep'); + if ($pg == '') { + echo ''; + return false; + } + + $cmd = "$pg roojspacker"; + $res = `$cmd`; + $out = empty($res) ? '' : trim($res); + if (strlen($out) > 0) { + echo ''; + return false; + } + + if (file_exists($output)) { unlink($output); } @@ -310,6 +324,15 @@ class Pman_Core_JsCompile extends Pman } + + function packIsRunning() + { + require_once 'System.php'; + + + } + + // depricated verison using seed. function packSeed($files, $output, $translation_base=false) {