use App\Models\FluidbookPublication;
use Cubist\Backpack\Magic\PageData;
use Cubist\Net\Transfer\Driver;
+use Cubist\Util\CommandLine;
use Cubist\Util\CommandLine\Rsync;
use Cubist\Util\Files\Files;
use Cubist\Util\PHP;
if (!$server) {
throw new \Exception('No valid server defined for external installation');
}
- if (!$dest) {
- throw new \Exception('No path defined for external server installation');
+ if (!$dest && !$server->allows_root) {
+ throw new \Exception('No path defined for external server installation : this server does not allow installing on root');
}
$translateVariables['server'] = $server->name;
{
$path = $this->_compile();
$driver = $server->getTransferDriver();
- $driver->copy($path, $dest, false, false);
+ $res = $driver->copy($path, $dest, false, false);
+ if ($res instanceof CommandLine) {
+ $res->debug();
+ }
return $server->makeURL($dest);
}
$fbOptions += $optionsFluidbooks[$fbid];
}
- $jobs[] = $this->_jobDownloadFluidbook($fbid, $version, $basePath . $this->dirs[$fbid], $fbOptions, false);
+ $jobs[] = $this->_jobDownloadFluidbook($fbid, $version, $basePath . $this->dirs[$fbid], $fbOptions, true);
}
$this->_waitJobs($jobs);