aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2020-12-07 10:25:10 -0800
committerRob Landley <rob@landley.net>2020-12-07 21:35:26 -0600
commitda0da1f147a317388570b9a8d6d08df24d0ddab4 (patch)
tree8f462568d8e023cfe6c2352b869ff300bac92373
parent50d8ed89b1e02917e83a33b3d62f465192dd500f (diff)
downloadtoybox-da0da1f147a317388570b9a8d6d08df24d0ddab4.tar.gz
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.
-rw-r--r--scripts/runtest.sh7
1 files changed, 5 insertions, 2 deletions
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
"$@"
}