|
|
@ -46,10 +46,14 @@ class Compiler |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$binary = file(__DIR__.'/../bin/mage'); |
|
|
|
|
|
|
|
unset($binary[0]); |
|
|
|
|
|
|
|
$binary = implode(PHP_EOL, $binary); |
|
|
|
|
|
|
|
|
|
|
|
$phar->addFromString('mage', str_replace( |
|
|
|
$phar->addFromString('mage', str_replace( |
|
|
|
'$baseDir = dirname(dirname(__FILE__));', |
|
|
|
'$baseDir = dirname(dirname(__FILE__));', |
|
|
|
'$baseDir = __DIR__;', |
|
|
|
'$baseDir = __DIR__;', |
|
|
|
file_get_contents(__DIR__.'/../bin/mage') |
|
|
|
$binary |
|
|
|
)); |
|
|
|
)); |
|
|
|
|
|
|
|
|
|
|
|
$phar->setStub("#!/usr/bin/env php\n<?php Phar::mapPhar('mage.phar'); require 'phar://mage.phar/mage'; __HALT_COMPILER();");
|
|
|
|
$phar->setStub("#!/usr/bin/env php\n<?php Phar::mapPhar('mage.phar'); require 'phar://mage.phar/mage'; __HALT_COMPILER();");
|
|
|
|