Esempio n. 1
0
 public function install()
 {
     if ($this->installer) {
         passthru('/usr/bin/env wget ' . escapeshellarg($this->installer) . ' -O- | /usr/bin/env php', $exitcode);
     } elseif ($this->download) {
         $dest = Yii::getAlias('@root/' . $this->name . '.phar', false);
         passthru('/usr/bin/env wget ' . escapeshellarg($this->download) . ' -O ' . $dest, $exitcode);
     } else {
         return parent::install();
     }
     return $exitcode;
 }
Esempio n. 2
0
 /**
  * Detect command execution string.
  * @param mixed $path
  * @return string
  */
 public function detectCommand($path)
 {
     $path = parent::detectCommand($path);
     return is_executable($path) ? $path : '/usr/bin/env python ' . $path;
 }