mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-09-04 00:01:17 +02:00
Fix comparing OS X version when it has 3 components
This commit is contained in:
parent
de155dd12b
commit
fc6e0ae69d
2 changed files with 4 additions and 5 deletions
|
@ -89,10 +89,9 @@ os_information() {
|
|||
# 10.9 -> 1009
|
||||
# 10.10 -> 1010
|
||||
osx_version() {
|
||||
local ver="$(sw_vers -productVersion)"
|
||||
local major="${ver%.*}"
|
||||
local minor="${ver#*.}"
|
||||
echo $(( major*100 + minor ))
|
||||
local -a ver
|
||||
IFS=. ver=( `sw_vers -productVersion` )
|
||||
echo $(( ${ver[0]}*100 + ${ver[1]} ))
|
||||
}
|
||||
|
||||
build_failed() {
|
||||
|
|
|
@ -8,7 +8,7 @@ export -n CC
|
|||
|
||||
@test "require_gcc on OS X 10.9" {
|
||||
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'
|
||||
|
||||
run_inline_definition <<DEF
|
||||
|
|
Loading…
Reference in a new issue