added more flibiliy for versions, added dry-run option

This commit is contained in:
tracer 2023-05-29 15:07:19 +02:00
parent ab55fd9abb
commit 7e85faf2f2
3 changed files with 567 additions and 496 deletions

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@ Shell Script to update phpBB to current version.
Usage:
Switch into you current phpBB root directory, then
Switch into your current phpBB root directory, then
`git clone https://git.24unix.net/tracer/phpbb_updates.git`

View File

@ -6,4 +6,17 @@ 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();