From: Rob Landley Date: Thu, 16 Feb 2006 09:00:57 +0000 (-0000) Subject: When setting an environment variable by piping something into grep, backquotes X-Git-Tag: 1_1_0~212 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=006fa2d45b16fbc5cdc256e533b2bbe1b4e60c0e;p=oweals%2Fbusybox.git When setting an environment variable by piping something into grep, backquotes can be useful. Also tweak an if case to be more portable. --- diff --git a/testsuite/testing.sh b/testsuite/testing.sh index c1002a6aa..f16f4c7e8 100755 --- a/testsuite/testing.sh +++ b/testsuite/testing.sh @@ -42,9 +42,9 @@ export SKIP= optional() { - option="$OPTIONFLAGS" | egrep "(^|:)$1(:|\$)" + option=`echo "$OPTIONFLAGS" | egrep "(^|:)$1(:|\$)"` # Not set? - if [[ -z "$1" || -z "$OPTIONFLAGS" || ${#option} -ne 0 ]] + if [ -z "$1" ] || [ -z "$OPTIONFLAGS" ] || [ ${#option} -ne 0 ] then SKIP="" return