From da0da1f147a317388570b9a8d6d08df24d0ddab4 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 7 Dec 2020 10:25:10 -0800 Subject: scripts/runtest.sh: fix `toyonly` in a way that also works for mksh. mksh doesn't support the =~ extension, so my previous change -- while fixing the host -- broke Android. --- scripts/runtest.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'scripts/runtest.sh') diff --git a/scripts/runtest.sh b/scripts/runtest.sh index 33d479ab..6aad9ff1 100644 --- a/scripts/runtest.sh +++ b/scripts/runtest.sh @@ -83,8 +83,11 @@ toyonly() IS_TOYBOX="$("$C" --version 2>/dev/null)" # Ideally we'd just check for "toybox", but toybox sed lies to make autoconf # happy, so we have at least two things to check for. - IS_TOYBOX_RE='(toybox|This is not GNU).*' - [[ "$IS_TOYBOX" =~ $IS_TOYBOX_RE ]] || SKIPNEXT=1 + case "$IS_TOYBOX" in + toybox*) ;; + This\ is\ not\ GNU*) ;; + *) SKIPNEXT=1 ;; + esac "$@" } -- cgit v1.2.3