From f190773790b56a0f2749cabc10f2565c90b8ffb5 Mon Sep 17 00:00:00 2001 From: Florent Rougon Date: Fri, 26 Apr 2019 10:44:03 +0200 Subject: [PATCH] download_and_compile.sh: use proper string comparison in _elementIn() In Bash, the [[ == ]] and [[ = ]] conditionals interpret as a shell globbing pattern. This wasn't desired in _elementIn(), where the string is provided by the caller, and might contain pattern metacharacters. Replace this conditional with a plain string comparison made with '[' (aka, the 'test' command). --- download_and_compile.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/download_and_compile.sh b/download_and_compile.sh index 547d3c2..8c6c5ba 100755 --- a/download_and_compile.sh +++ b/download_and_compile.sh @@ -49,7 +49,7 @@ _elementIn(){ shift for e; do - if [[ "$e" == "$valueToCheck" ]]; then + if [ "$e" = "$valueToCheck" ]; then return 0 fi done