First version
This commit is contained in:
32
backup
Executable file
32
backup
Executable file
@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
$autoload = null;
|
||||
|
||||
$autoloadFiles = [
|
||||
__DIR__ . '/../vendor/autoload.php',
|
||||
__DIR__ . '/../../../autoload.php',
|
||||
__DIR__ . '/vendor/autoload.php'
|
||||
];
|
||||
|
||||
foreach ($autoloadFiles as $autoloadFile) {
|
||||
if (file_exists($autoloadFile)) {
|
||||
$autoload = $autoloadFile;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (! $autoload) {
|
||||
echo "Autoload file not found; try 'composer dump-autoload' first." . PHP_EOL;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
require $autoload;
|
||||
|
||||
use Symfony\Component\Console\Application;
|
||||
|
||||
$application = new Application();
|
||||
|
||||
$application->add(new App\CommandBackup());
|
||||
$application->add(new App\CommandShow());
|
||||
|
||||
$application->run();
|
Reference in New Issue
Block a user