示例#1
0
 /**
  * Set the openssl command line options
  *
  * @param \phpbu\App\Cli\Cmd $cmd
  */
 protected function setOptions(Cmd $cmd)
 {
     $cmd->addOptionIfNotEmpty('-h', $this->host, true, ' ');
     $cmd->addOptionIfNotEmpty('-p', $this->port, true, ' ');
     $cmd->addOptionIfNotEmpty('-a', $this->password, true, ' ');
 }
示例#2
0
 /**
  * Add the 'rm' command to remove the uncrypted file.
  *
  * @param \phpbu\App\Cli\Process $process
  */
 protected function addDeleteCommand(Process $process)
 {
     if ($this->deleteUncrypted) {
         $cmd = new Cmd('rm');
         if (!$this->showStdErr) {
             $cmd->silence();
             // i kill you
         }
         $cmd->addArgument($this->sourceFile);
         $process->addCommand($cmd);
     }
 }
示例#3
0
 /**
  * Return 'rm' command.
  *
  * @return \phpbu\App\Cli\Cmd
  */
 protected function getRmCommand()
 {
     $rm = new Cmd('rm');
     $rm->addOption('-rf', $this->path, ' ');
     if (!$this->showStdErr) {
         $rm->silence();
     }
     return $rm;
 }