Esempio n. 1
0
    usage();
}
/* ========================================================================= */
/* #                               Installing                              # */
/* ========================================================================= */
$state = State::instance();
$installerArgs = [$state->hail, $supplier, $package];
switch (\strtolower($type)) {
    case 'cabin':
        $installer = new Cabin(...$installerArgs);
        break;
    case 'gadget':
        $installer = new Gadget(...$installerArgs);
        break;
    case 'motif':
        $installer = new Motif(...$installerArgs);
        break;
}
// Local source file:
if ($source) {
    if (!$version) {
        $version = $this->prompt("What version should we expect? ");
    }
    $installer->useLocalInstallFile($source, $version);
}
// Dangerous:
if ($bypassSecurity) {
    $installer->bypassSecurityAndJustInstall(true);
}
// Now let's run the easy-install process:
if ($installer->easyInstall()) {
Esempio n. 2
0
/* ========================================================================= */
/* #                               Installing                              # */
/* ========================================================================= */
$state = State::instance();
$updaterArgs = [$state->hail, $supplier, $package];
switch (\strtolower($type)) {
    case 'airship':
        $updater = new Airship(...$updaterArgs);
        break;
    case 'cabin':
        $updater = new Cabin(...$updaterArgs);
        break;
    case 'gadget':
        $updater = new Gadget(...$updaterArgs);
        break;
    case 'motif':
        $updater = new Motif(...$updaterArgs);
        break;
}
if ($source) {
    $updater->useLocalUpdateFile($source, $version);
}
if ($bypassSecurity) {
    $updater->bypassSecurityAndJustInstall(true);
}
if ($updater->manualUpdate($version)) {
    echo 'Success.', "\n";
    exit(0);
} else {
    echo 'Install unsuccessful. Check the logs for more information.', "\n";
}