Skip to content

Commit a68d340

Browse files
MichaIngFlole998
authored andcommitted
configure: fix parsing args if values contain "="
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: tvheadend#1665 Signed-off-by: MichaIng <micha@dietpi.com>
1 parent b100585 commit a68d340

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

configure

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ opt=
9696
val=
9797
for opt do
9898
val=${opt#*=}
99-
opt=${opt%=*}
99+
opt=${opt%%=*}
100100
opt=${opt#*--}
101101
case "$opt" in
102102
help)

0 commit comments

Comments
 (0)