summaryrefslogtreecommitdiff
path: root/src/core/libs/lib-misc.sh
diff options
context:
space:
mode:
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
}