From afa63b2dcdc9b9d0183ffd84599ea5d4ad94d639 Mon Sep 17 00:00:00 2001 From: Michael Tokarev Date: Sun, 10 Nov 2013 22:01:38 +0100 Subject: fix bashisms in testsuite/ These places use ${var/search/replace}, $((n++) and `type -p' constructs which are not-so-standard. Replace with equivalent constructs. Signed-off-by: Michael Tokarev Signed-off-by: Bernhard Reutner-Fischer --- testsuite/hostid/hostid-works | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'testsuite/hostid') diff --git a/testsuite/hostid/hostid-works b/testsuite/hostid/hostid-works index bcfd717af..8c20bdfcc 100644 --- a/testsuite/hostid/hostid-works +++ b/testsuite/hostid/hostid-works @@ -1,8 +1,6 @@ h=x$(busybox hostid) # Is $h a sequence of hex numbers? -x="${h//[0123456789abcdef]/x}" -x="${x//xxx/x}" -x="${x//xxx/x}" -x="${x//xxx/x}" -x="${x//xx/x}" -test x"$x" = x"x" +case "$h" in + x*[!0-9a-f]*) false;; + *) true;; +esac -- cgit v1.2.3