phpbb_updates/update.php

23 lines
481 B
PHP
Executable File

#!/usr/bin/env php
<?php
use App\UpdateController;
require __DIR__ . '/vendor/autoload.php';
$update = new UpdateController();
$options = $update->parseOpts();
// Help option
if (array_key_exists(key: 'h', array: $options) || array_key_exists(key: 'help', array: $options)) {
$update->printHelp();
exit(0);
}
if (array_key_exists(key: 'd', array: $options) || array_key_exists(key: 'dry-run', array: $options)) {
$update->setDryRun();
}
$update->handleUpdate();