Refactor build process and streamline executable handling
This commit is contained in:
parent
015f13bf12
commit
9e97a6d414
4 changed files with 134 additions and 180 deletions
24
main
24
main
|
@ -1,6 +1,24 @@
|
|||
<?php
|
||||
|
||||
require('ncc');
|
||||
import('net.nosial.configlib', 'latest');
|
||||
if (PHP_SAPI !== 'cli')
|
||||
{
|
||||
print('net.nosial.configlib must be run from the command line.' . PHP_EOL);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
\ConfigLib\Program::main();
|
||||
if(!isset($argv))
|
||||
{
|
||||
if(isset($_SERVER['argv']))
|
||||
{
|
||||
$argv = $_SERVER['argv'];
|
||||
}
|
||||
else
|
||||
{
|
||||
print('net.nosial.configlib failed to run, no $argv found.' . PHP_EOL);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
require('ncc');
|
||||
\ncc\Classes\Runtime::import('net.nosial.configlib', 'latest');
|
||||
exit(\ConfigLib\Program::main($argv));
|
Loading…
Add table
Add a link
Reference in a new issue