23 lines
467 B
PHP
Executable File
23 lines
467 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
|
|
$cwd = getcwd();
|
|
chdir(__DIR__.'/../');
|
|
shell_exec('php bin/composer install -q');
|
|
chdir($cwd);
|
|
|
|
require __DIR__.'/../src/bootstrap.php';
|
|
|
|
use Composer\Compiler;
|
|
|
|
error_reporting(-1);
|
|
ini_set('display_errors', 1);
|
|
|
|
try {
|
|
$compiler = new Compiler();
|
|
$compiler->compile();
|
|
} catch (\Exception $e) {
|
|
echo 'Failed to compile phar: ['.get_class($e).'] '.$e->getMessage().' at '.$e->getFile().':'.$e->getLine().PHP_EOL;
|
|
exit(1);
|
|
}
|