summaryrefslogtreecommitdiff
path: root/src/core/libs/lib-misc.sh
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2009-02-28 18:22:15 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2009-02-28 18:22:15 +0100
commit031b0a3936898a64976ba06fb2c8bb242fac046e (patch)
tree90162625b30b92375d0cfa1861a0f7d79d5da30d /src/core/libs/lib-misc.sh
parenteb3afb93e955f53bb5ca4c294c2155d66da4e645 (diff)
debug fix in check_is_in
Diffstat (limited to 'src/core/libs/lib-misc.sh')
-rw-r--r--src/core/libs/lib-misc.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/libs/lib-misc.sh b/src/core/libs/lib-misc.sh
index 6f7af95..d0ad3f0 100644
--- a/src/core/libs/lib-misc.sh
+++ b/src/core/libs/lib-misc.sh
@@ -51,15 +51,17 @@ wait_for ()
check_is_in ()
{
[ -z "$1" ] && debug 'MISC' "check_is_in $1 $2" && die_error "check_is_in needs a non-empty needle as \$1 and a haystack as \$2!" # haystack can be empty though
+ NEEDLE=$1
+ HAYSTACK=$2
- local pattern="$1" element
+ local pattern="$NEEDLE" element
shift
for element
do
[[ $element = $pattern ]] && debug 'MISC' "Checking if $element = $pattern ..yes !" && return 0
debug 'MISC' "Checking if $element = $pattern ... no"
done
- debug 'MISC' "Check_is_in could not find $1 in $2"
+ debug 'MISC' "Check_is_in could not find $NEEDLE in $HAYSTACK"
return 1
}