mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-01-16 18:04:34 -05:00
24 lines
561 B
PHP
Executable File
24 lines
561 B
PHP
Executable File
#! /usr/bin/env php
|
|
<?php
|
|
|
|
require_once(__DIR__ . '/../lib/bootstrap.php');
|
|
|
|
$twig = Gazelle\Util\Twig::factory(new \Gazelle\Manager\User());
|
|
|
|
// there is no dump() in production
|
|
$twig->addFunction(new \Twig\TwigFunction('dump', function ($value) { return ''; }));
|
|
|
|
$exitcode = 0;
|
|
|
|
array_shift($argv);
|
|
foreach ($argv as $arg) {
|
|
try {
|
|
$twig->parse($twig->tokenize(new \Twig\Source(file_get_contents($arg), $arg)));
|
|
} catch (\Twig\Error\SyntaxError $e) {
|
|
echo "$arg: {$e->getMessage()}\n";
|
|
$exitcode = 1;
|
|
}
|
|
}
|
|
|
|
exit($exitcode);
|