23 lines
507 B
PHP
Executable File
23 lines
507 B
PHP
Executable File
#!/usr/bin/keyhelp-php81 -d apc.enable_cli=1
|
|
<?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();
|