modifs.mineures sans commentaires

This commit is contained in:
Jephté Clain 2024-09-26 19:54:30 +04:00
parent 1c936caf26
commit 1cc2fff84e
1 changed files with 5 additions and 8 deletions

View File

@ -7,15 +7,13 @@ use nur\sery\os\path;
use nur\sery\wip\app\app2;
if ($argc <= 1) die("invalid arguments");
app2::init([
"projdir" => __DIR__ . '/..',
"appcode" => \app\config\bootstrap::APPCODE,
]);
app2::init(NULIB_APP_app_params);
$app = $argv[1];
if (class_exists($app)) {
# la configuration est celle actuellement chargée
array_splice($argv, 1, 1);
$argc--;
array_splice($argv, 1, 1); $argc--;
$app::run();
} elseif (is_executable($app)) {
# la configuration est passée par une variable d'environnement
@ -23,8 +21,7 @@ if (class_exists($app)) {
pcntl_exec($app, array_slice($argv, 1));
} else {
# la configuration est celle actuellement chargée
array_splice($argv, 0, 1);
$argc--;
array_splice($argv, 0, 1); $argc--;
$name = preg_replace('/\.php$/', "", path::basename($app));
app2::init([
"name" => $name,