codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
*** FileSyncTask.php 2008-08-28 15:48:07.000000000 -0400 --- FileSyncTask.php.mine 2008-08-28 15:45:26.000000000 -0400 *************** require_once "phing/Task.php"; *** 39,44 **** --- 39,45 ---- * @author Federico Cargnelutti <fedecarg@gmail.com> * @version $Revision$ * @package phing.tasks.ext + * @see http://svn.fedecarg.com/repo/Phing/tasks/ext/FileSyncTask.php */ class FileSyncTask extends Task { *************** class FileSyncTask extends Task *** 128,133 **** --- 129,140 ---- * @var boolean */ protected $delete = false; + + /** + * Identity file + * @var string + */ + protected $identityFile; /** * Phing's main method. Wraps the executeCommand() method. *************** class FileSyncTask extends Task *** 225,230 **** --- 232,241 ---- if ($this->excludeFile !== null) { $options .= ' --exclude-from=' . $this->excludeFile; } + + if ($this->identityFile !== null) { + $options .= ' -e "ssh -i '. $this->identityFile . '"'; + } $this->setOptions($options); *************** class FileSyncTask extends Task *** 262,267 **** --- 273,279 ---- $info .= '----------------------------------------' . $lf; $info .= 'Source: ' . $this->sourceDir . $lf; $info .= 'Destination: ' . $this->destinationDir . $lf; + $info .= 'Identity ' . $this->identityFile . $lf; $info .= 'Backup: ' . $backupDir . $dlf; $info .= 'Exclude patterns' . $lf; $info .= '----------------------------------------' . $lf; *************** class FileSyncTask extends Task *** 413,416 **** --- 425,439 ---- { $this->backupDir = $dir; } + + /** + * Sets the identity file for public key transfers + * + * @param string location of ssh identity file + */ + public function setIdentityFile($identity) { + $this->identityFile = $identity; + } + } +
Private
[
?
]
Run code