Commit fc6e0ae6 by Mislav Marohnić

Fix comparing OS X version when it has 3 components

parent de155dd1
...@@ -89,10 +89,9 @@ os_information() { ...@@ -89,10 +89,9 @@ os_information() {
# 10.9 -> 1009 # 10.9 -> 1009
# 10.10 -> 1010 # 10.10 -> 1010
osx_version() { osx_version() {
local ver="$(sw_vers -productVersion)" local -a ver
local major="${ver%.*}" IFS=. ver=( `sw_vers -productVersion` )
local minor="${ver#*.}" echo $(( ${ver[0]}*100 + ${ver[1]} ))
echo $(( major*100 + minor ))
} }
build_failed() { build_failed() {
......
...@@ -8,7 +8,7 @@ export -n CC ...@@ -8,7 +8,7 @@ export -n CC
@test "require_gcc on OS X 10.9" { @test "require_gcc on OS X 10.9" {
stub uname '-s : echo Darwin' stub uname '-s : echo Darwin'
stub sw_vers '-productVersion : echo 10.9' stub sw_vers '-productVersion : echo 10.9.5'
stub gcc '--version : echo 4.2.1' stub gcc '--version : echo 4.2.1'
run_inline_definition <<DEF run_inline_definition <<DEF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment