[112220] trunk/base/src/macports1.0/macports.tcl

jeremyhu at macports.org jeremyhu at macports.org
Tue Oct 15 11:26:37 PDT 2013


Revision: 112220
          https://trac.macports.org/changeset/112220
Author:   jeremyhu at macports.org
Date:     2013-10-15 11:26:37 -0700 (Tue, 15 Oct 2013)
Log Message:
-----------
Use sw_vers to find macosx_version and use just the first two components (major

Modified Paths:
--------------
    trunk/base/src/macports1.0/macports.tcl

Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl	2013-10-15 17:02:44 UTC (rev 112219)
+++ trunk/base/src/macports1.0/macports.tcl	2013-10-15 18:26:37 UTC (rev 112220)
@@ -597,8 +597,7 @@
     set os_endian [string range $tcl_platform(byteOrder) 0 end-6]
     set macosx_version {}
     if {$os_platform eq {darwin}} {
-        # This will probably break when Apple changes versioning
-        set macosx_version 10.[expr {$os_major - 4}]
+        set macosx_version [exec sw_vers -productVersion | cut -f1,2 -d.]
     }
 
     # Ensure that the macports user directory (i.e. ~/.macports) exists if HOME is defined.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131015/4d8e23f0/attachment.html>


More information about the macports-changes mailing list