args name with "-"

This commit is contained in:
2024-10-16 21:25:02 +02:00
parent 6c33080785
commit 653bb604f5
4 changed files with 150 additions and 150 deletions

View File

@ -13,11 +13,10 @@ foreach ($args as $arg => $value) {
die();
} else if ($value) {
if ($value === true) {
if (strlen($arg) <= 2) $command .= " -$arg";
else $command .= " --$arg";
$command .= " $arg";
} else {
if (strlen($arg) <= 2) $command .= " -$arg$value";
else $command .= " --$arg $value";
if (substr($arg, 0, 2) == '--') $command .= " $arg $value";
else $command .= " $arg$value";
}
}
}