Misc fixes
This commit is contained in:
parent
e6344b3cee
commit
7ef6aa2581
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
/composer.lock
|
/composer.lock
|
||||||
/vendor
|
/vendor
|
||||||
|
/*.phar
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once __DIR__."/../vendor/autoload.php";
|
if (file_exists(__DIR__."/../vendor"))
|
||||||
|
require_once __DIR__."/../vendor/autoload.php";
|
||||||
|
elseif (file_exists(__DIR__."/../../../vendor"))
|
||||||
|
require_once __DIR__."/../../../vendor/autoload.php";
|
||||||
|
else
|
||||||
|
die("Could not locate composer vendor/autoload.php");
|
||||||
|
|
||||||
define("PHARLITE_VERSION", "0.1.x");
|
define("PHARLITE_VERSION", "0.1.x");
|
||||||
|
|
||||||
@ -80,4 +85,4 @@ if (false === parse_opts()) {
|
|||||||
$path = getcwd();
|
$path = getcwd();
|
||||||
|
|
||||||
$builder = new PharLite\Builder($path, $opts);
|
$builder = new PharLite\Builder($path, $opts);
|
||||||
$builder->build();
|
$builder->build();
|
||||||
|
@ -150,6 +150,9 @@ class Builder
|
|||||||
$phar->addFromString($bin, $str);
|
$phar->addFromString($bin, $str);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (count($bins)) {
|
||||||
|
$index = array_shift($bins);
|
||||||
|
}
|
||||||
$indexFile = file_get_contents($index);
|
$indexFile = file_get_contents($index);
|
||||||
$indexFile = $this->stripShebang($indexFile);
|
$indexFile = $this->stripShebang($indexFile);
|
||||||
$index = "bootstrap.php";
|
$index = "bootstrap.php";
|
||||||
|
Loading…
Reference in New Issue
Block a user