- public function error($fmt) {
- if (!$this->args->quiet) {
- vfprintf(STDERR, "ERROR: $fmt", array_slice(func_get_args(), 1));
+ private function install($temp) {
+ try {
+ // phpize
+ $this->info("Running phpize ...\n");
+ $phpize = new Task\Phpize($temp, $this->args->prefix, $this->args->{"common-name"});
+ $phpize->run($this->args->verbose);
+
+ // configure
+ $this->info("Running configure ...\n");
+ $configure = new Task\Configure($temp, $this->args->configure, $this->args->prefix, $this->args{"common-name"});
+ $configure->run($this->args->verbose);
+
+ // make
+ $this->info("Running make ...\n");
+ $make = new Task\Make($temp);
+ $make->run($this->args->verbose);
+
+ // install
+ $this->info("Running make install ...\n");
+ $sudo = isset($this->args->sudo) ? $this->args->sudo : null;
+ $install = new Task\Make($temp, ["install"], $sudo);
+ $install->run($this->args->verbose);
+
+ } catch (\Exception $e) {
+ $this->error("%s\n", $e->getMessage());
+ exit(2);