From fa1709216be212bd7480e413c29ee3a6112057d0 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Sun, 29 Sep 2024 16:26:11 +0400 Subject: [PATCH] modifs.mineures sans commentaires --- wip/app/cli/Application.php | 38 +++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/wip/app/cli/Application.php b/wip/app/cli/Application.php index ef215bb..67f41ed 100644 --- a/wip/app/cli/Application.php +++ b/wip/app/cli/Application.php @@ -100,27 +100,16 @@ abstract class Application { switch ($argv[1] ?? "infos") { case "help": self::_info(<<isRunning()) $runfile->wfKill(); - else $ec = self::_error("not running"); - break; - case "release": - case "rl": - $runfile->release(); - break; case "infos": case "i": $desc = $runfile->getDesc(); @@ -142,6 +131,19 @@ EOT); if (!$runfile->isRunning()) $runfile->reset(); else $ec = self::_error("cannot reset while running"); break; + case "release": + case "rl": + $runfile->release(); + break; + case "start": + case "s": + array_splice($argv, 1, 1); $argc--; + return; + case "kill": + case "k": + if ($runfile->isRunning()) $runfile->wfKill(); + else $ec = self::_error("not running"); + break; default: $ec = self::_error("$argv[1]: unexpected command", app2::EC_BAD_COMMAND); }