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(-)
From 071720ada7d6cf1090d3279b95fc44ca566ca8d5 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <[email protected]>
Date: Mon, 7 Dec 2020 10:25:10 -0800
Subject: [PATCH] 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(-)
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
"$@"
}
--
2.29.2.576.ga3fc446d84-goog
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net