aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinstall8
1 files changed, 7 insertions, 1 deletions
diff --git a/install b/install
index 36e747a08..743a99cfd 100755
--- a/install
+++ b/install
@@ -63,8 +63,14 @@ def wait_for_user
abort unless c == 13 or c == 10
end
+module Version
+ def <=>(other)
+ split(".").map { |i| i.to_i } <=> other.split(".").map { |i| i.to_i }
+ end
+end
+
def macos_version
- @macos_version ||= `/usr/bin/sw_vers -productVersion`.chomp[/10\.\d+/]
+ @macos_version ||= `/usr/bin/sw_vers -productVersion`.chomp[/10\.\d+/].extend(Version)
end
def git