Yaffs site version 1.1
[yaffs-website] / vendor / psy / psysh / bin / build-phar
1 #!/usr/bin/env php
2 <?php
3
4 /*
5  * This file is part of Psy Shell.
6  *
7  * (c) 2012-2017 Justin Hileman
8  *
9  * For the full copyright and license information, please view the LICENSE
10  * file that was distributed with this source code.
11  */
12
13 if (!is_file(dirname(__DIR__) . '/vendor/autoload.php')) {
14     throw new RuntimeException('Missing PsySH dev dependencies in ' . dirname(__DIR__) . '/vendor/' . ', install with `composer.phar install --dev`.');
15 }
16
17 require dirname(__DIR__) . '/vendor/autoload.php';
18
19 if (!class_exists('Symfony\Component\Finder\Finder')) {
20     throw new RuntimeException('Missing PsySH dev dependencies, install with `composer.phar install --dev`.');
21 }
22
23 if (!is_file(dirname(__DIR__) . '/build-vendor/autoload.php')) {
24     throw new RuntimeException('Missing phar vendor dependencies, install with bin/build-vendor');
25 }
26
27 use Psy\Compiler;
28
29 error_reporting(-1);
30 ini_set('display_errors', 1);
31
32 $compiler = new Compiler();
33
34 if (isset($_SERVER['argv']) && isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] === '--compat') {
35     $compiler->compile('psysh-compat.phar');
36 } else {
37     $compiler->compile();
38 }