From f0b50fa23b0aecb1de1fc37d93f495196bc2cf30 Mon Sep 17 00:00:00 2001 From: James Farrell Date: Mon, 23 May 2022 16:19:06 +0000 Subject: [PATCH] Use extglob rather than regex match operator. Not all shells support =~. Android, for example, uses mksh, which does not. Change is from suggestion at http://www.mirbsd.org/mksh-faq.htm#regex-comparison --- scripts/runtest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/runtest.sh b/scripts/runtest.sh index 5a6476772..a0ddd56a8 100644 --- a/scripts/runtest.sh +++ b/scripts/runtest.sh @@ -234,7 +234,7 @@ txpect() then [ -z "$A" -o "$X" -ne 0 ] && { do_fail;break;} else - if [ ${1::1} == 'R' ] && [[ "$A" =~ "${1:2}" ]]; then true + if [ ${1::1} == 'R' ] && [[ "$A" = *"${1:2}"* ]]; then true elif [ ${1::1} != 'R' ] && [ "$A" == "${1:1}" ]; then true else # Append the rest of the output if there is any.