-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
depanno
45 lines (37 loc) · 899 Bytes
/
depanno
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env php
<?php
/**
* @copyright 2021 Navarr Barnier. All Rights Reserved.
*/
declare(strict_types=1);
use Navarr\Depends\Controller\CliApplication;
if (version_compare('7.1.0', PHP_VERSION, '>')) {
fwrite(
STDERR,
"This version of DepAnno requires PHP 7.1.0 or greater." . PHP_EOL .
"You are currently using PHP " . PHP_VERSION . PHP_EOL
);
die(1);
}
if (!ini_get('date.timezone')) {
ini_set('date.timezone', 'UTC');
}
$found = false;
foreach (
[
__DIR__ . '/../../autoload.php',
__DIR__ . '/../vendor/autoload.php',
__DIR__ . '/vendor/autoload.php',
] as $autoload
) {
if (file_exists($autoload)) {
require_once($autoload);
$found = true;
break;
}
}
if (!$found) {
fwrite(STDERR, "You must install DepAnno using Composer");
die(1);
}
die(CliApplication::execute());