From 33c022fceca0b0f3c91b656c326102a5c76d69a7 Mon Sep 17 00:00:00 2001 From: tibbes Date: Mon, 21 Nov 2016 20:25:46 +0000 Subject: [PATCH] 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 ``` --- buildscripts/checkdeps.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildscripts/checkdeps.sh b/buildscripts/checkdeps.sh index 0ec49ad95..7bcbd1120 100644 --- a/buildscripts/checkdeps.sh +++ b/buildscripts/checkdeps.sh @@ -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