download_and_compile.sh: use proper string comparison in _elementIn()

In Bash, the [[ <foo> == <bar> ]] and [[ <foo> = <bar> ]] conditionals
interpret <bar> as a shell globbing pattern. This wasn't desired in
_elementIn(), where the <bar> 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).
This commit is contained in:
Florent Rougon 2019-04-26 10:44:03 +02:00
parent 5b34458439
commit f190773790

View File

@ -49,7 +49,7 @@ _elementIn(){
shift
for e; do
if [[ "$e" == "$valueToCheck" ]]; then
if [ "$e" = "$valueToCheck" ]; then
return 0
fi
done