diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/libs/lib-misc.sh | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/libs/lib-misc.sh b/src/core/libs/lib-misc.sh index 7129f58..113555f 100644 --- a/src/core/libs/lib-misc.sh +++ b/src/core/libs/lib-misc.sh @@ -80,14 +80,12 @@ wait_for () check_is_in () { [ -z "$1" ] && die_error "check_is_in needs a non-empty needle as \$1 and a haystack as \$2!(got: check_is_in '$1' '$2'" # haystack can be empty though - NEEDLE=$1 - HAYSTACK=$2 - local pattern="$NEEDLE" element + local needle="$1" element shift for element do - [[ $element = $pattern ]] && return 0 + [[ $element = $needle ]] && return 0 done return 1 } |