]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
configure: fix parsing args if values contain "="
authorMichaIng <micha@dietpi.com>
Thu, 18 Apr 2024 19:05:22 +0000 (21:05 +0200)
committerFlole <Flole998@users.noreply.github.com>
Sat, 20 Apr 2024 23:47:11 +0000 (01:47 +0200)
Currently, when the value of an option passed to the configure script as argument contains an equal sign "=", the part of the string up to the second equal sign is used as option. This commit changes how the string is split, so that always only the part up to the first equal sign is interpreted as option.

"${var%=*}" removes everything from the last equal sign, "${var%%=*}" removes everything from the first equal sign.

This allows to pass CFLAGS, which usually contain equal signs, like
"--cflags=-march=armv6 -mfloat-abi=hard -mfpu=vfp"

For reference: https://github.com/tvheadend/tvheadend/issues/1665

Signed-off-by: MichaIng <micha@dietpi.com>
configure

index 970404d2ee5830ec49112632b03d61ee9d653dd8..96bacd218639c43d218a4c879ba4f839235bf14f 100755 (executable)
--- a/configure
+++ b/configure
@@ -96,7 +96,7 @@ opt=
 val=
 for opt do
   val=${opt#*=}
-  opt=${opt%=*}
+  opt=${opt%%=*}
   opt=${opt#*--}
   case "$opt" in
     help)