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:
parent
5b34458439
commit
f190773790
@ -49,7 +49,7 @@ _elementIn(){
|
||||
|
||||
shift
|
||||
for e; do
|
||||
if [[ "$e" == "$valueToCheck" ]]; then
|
||||
if [ "$e" = "$valueToCheck" ]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user