Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame^] | 1 | #!/usr/bin/env php |
2 | <?php | ||||
3 | |||||
4 | $dir = __DIR__.'/..'; | ||||
5 | |||||
6 | if (!file_exists($dir.'/autoload.php')) { | ||||
7 | $dir = __DIR__.'/../vendor'; | ||||
8 | } | ||||
9 | |||||
10 | if (!file_exists($dir.'/autoload.php')) { | ||||
11 | $dir = __DIR__.'/../../..'; | ||||
12 | } | ||||
13 | |||||
14 | if (!file_exists($dir.'/autoload.php')) { | ||||
15 | echo 'Autoload not found.'; | ||||
16 | exit(1); | ||||
17 | } | ||||
18 | |||||
19 | require $dir.'/autoload.php'; | ||||
20 | |||||
21 | exit((new \Carbon\Cli\Invoker())(...$argv) ? 0 : 1); |