cleanupEnv = false; if (!file_exists($envFile)) { file_put_contents($envFile, $ssEnv); $this->cleanupEnv = true; } } function cleanEnv() { if ($this->cleanupEnv) { $envFile = dirname(dirname(__FILE__)).'/_ss_environment.php'; if (file_exists($envFile)) { unlink($envFile); } } } function devBuild() { if (file_exists('framework/cli-script.php')) { $this->log("Running dev/build"); $this->exec('php framework/cli-script.php dev/build'); } } /** * Get some input from the user * * @param string $prompt * @return string */ function getInput($prompt) { require_once 'phing/input/InputRequest.php'; $request = new InputRequest($prompt); $request->setPromptChar(':'); $this->project->getInputHandler()->handleInput($request); $value = $request->getInput(); return $value; } function exec($cmd, $returnContent = false, $ignoreError = false) { $ret = null; $return = null; $this->log($cmd, Project::MSG_VERBOSE); if ($returnContent) { $ret = shell_exec($cmd); } else { passthru($cmd, $return); } if ($return != 0 && !$ignoreError) { throw new BuildException("Command '$cmd' failed"); } return $ret; } }