mirror of
https://github.com/getgrav/grav.git
synced 2026-09-11 05:50:17 +02:00
31 lines
735 B
PHP
Executable File
31 lines
735 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
|
|
use Symfony\Component\Console\Application;
|
|
|
|
$autoload = __DIR__ . '/../vendor/autoload.php';
|
|
if (!is_file($autoload)) {
|
|
exit('Please run: composer install -o');
|
|
}
|
|
|
|
require_once $autoload;
|
|
|
|
if (!ini_get('date.timezone')) {
|
|
date_default_timezone_set('UTC');
|
|
}
|
|
|
|
if (!file_exists(ROOT_DIR . 'index.php')) {
|
|
exit('FATAL: Must be run from ROOT directory of Grav!');
|
|
}
|
|
|
|
$app = new Application('Grav CLI Application', '0.1.0');
|
|
$app->addCommands(array(
|
|
new Grav\Console\InstallCommand(),
|
|
new Grav\Console\SetupCommand(),
|
|
new Grav\Console\CleanCommand(),
|
|
new Grav\Console\ClearCacheCommand(),
|
|
new Grav\Console\BackupCommand(),
|
|
new Grav\Console\NewProjectCommand(),
|
|
));
|
|
$app->run();
|