Fix checkdeps.sh on Mac (#3306)

Update the check_minimum_version function to use numeric comparison (not
string comparison) on components of version numbers. Fixes the following
output:

```
$ make
Checking deps:
ERROR
OSX version '10.11.6' not supported.
Minimum supported version: 10.8
make: *** [checks] Error 1
```
This commit is contained in:
tibbes 2016-11-21 20:25:46 +00:00 committed by Harshavardhana
parent 273228fafa
commit 33c022fcec

View File

@ -72,9 +72,9 @@ check_minimum_version() {
IFS='.' read -r -a varray2 <<< "$2"
for i in "${!varray1[@]}"; do
if [[ ${varray1[i]} < ${varray2[i]} ]]; then
if [[ ${varray1[i]} -lt ${varray2[i]} ]]; then
return 0
elif [[ ${varray1[i]} > ${varray2[i]} ]]; then
elif [[ ${varray1[i]} -gt ${varray2[i]} ]]; then
return 1
fi
done