Fix build script

This commit is contained in:
Laurent Destailleur 2023-06-04 14:02:05 +02:00
parent 1859932a18
commit ab46347eaa

View File

@ -60,10 +60,22 @@ while ($i < $argc) {
if (!empty($argv[$i])) {
parse_str($argv[$i], $result); // set all params $release, $includecustom, $includeconstant, $buildzip ...
}
if (preg_match('/includeconstant=/', $argv[$i])) {
$tmp=explode(':', $includeconstant, 3); // $includeconstant has been set with previous parse_str()
if (!empty($result["release"])) {
$release = $result["release"];
}
if (!empty($result["includecustom"])) {
$includecustom = $result["includecustom"];
}
if (!empty($result["includeconstant"])) {
$includeconstants[$i] = $result["includeconstant"];
}
if (!empty($result["buildzip"])) {
$buildzip=1;
}
if (preg_match('/includeconstant=/', strval($argv[$i]))) {
$tmp=explode(':', $result['includeconstant'], 3); // $includeconstant has been set with previous parse_str()
if (count($tmp) != 3) {
print "Error: Bad parameter includeconstant=".$includeconstant."\n";
print "Error: Bad parameter includeconstant=".$result['includeconstant'] ."\n";
exit -1;
}
$includeconstants[$tmp[0]][$tmp[1]] = $tmp[2];