}
protected function _install() {
- $package = wsPackager::package($this->book_id, $this->version, $this->_haveToZip());
+ $p = wsPackager::package($this->book_id, $this->version, $this->_haveToZip(),false);
- if (strpos($package, '/fluidbook') == 0) {
- $package = ROOT . $package;
+ if (strpos($p, '/fluidbook') == 0) {
+ $p = ROOT . $p;
}
$root = '/mnt/sshfs/fluidbook/www/references/';
$rootURL = 'https://www.fluidbook.com/references/';
} else if ($this->action == 'hosting') {
- //$root = 'fluidbook@hosting.fluidbook.com:/home/fluidbook/hosting/';
$root = '/mnt/sshfs/fluidbook/hosting/';
$rootURL = 'http://hosting.fluidbook.com/';
} else if ($this->action == 'ftp') {
}
if (stristr($path, 'ftp://')) {
- $this->_lftp($package, $path, false);
+ $this->_lftp($p, $path, false);
} else {
- $this->_rsync($package, $path);
+ $this->_rsync($p, $path);
}
if (!is_null($rootURL)) {
}
protected function _rsync($src, $dest, $erase = false, $chown = null) {
- if (is_file($src)) {
+ /*if (is_file($src)) {
$dir = dirname($dest);
if (!file_exists($dir)) {
mkdir($dir, 0777, true);
`chown $chown $dest`;
}
return;
- }
+ }*/
$cl = new CubeIT_CommandLine_Rsync($src, $dest, $erase);
$cl->setProg('/usr/bin/rsync');
protected $_clean = true;
public $cleanOnDestruct = true;
- public static function package($book_id, $version, $zip = true) {
+ public static function package($book_id, $version, $zip = true, $cleanOnDestruct = true) {
global $packager;
cubePHP::neverStop();
} else if ($version == 'phonegap') {
$packager = new wsPackagerPhonegap($book_id);
}
+ $packager->cleanOnDestruct = $packager->cleanOnDestruct && $cleanOnDestruct;
return $packager->makePackage($zip);
}