Re: sysv and OS X 10.4.10 and .11
Re: sysv and OS X 10.4.10 and .11
- Subject: Re: sysv and OS X 10.4.10 and .11
- From: "Mark J. Reed" <email@hidden>
- Date: Fri, 21 Dec 2007 07:28:47 -0500
On Dec 21, 2007 3:56 AM, Philip Aker <
email@hidden> wrote:
set
cv
to
(
do shell script
"sw_vers -productVersion | cut -d '.' -f 1-2 | tr -d .")
Well, that works. There'll be a big numeric jump from 109 to 1010, but as long as you're only looking at the first two components, at least it's monotonically increasing.
One way to do correct version comparison is to use the sort command:
set lowerVersion to (do shell script "(sw_vers -productVersion; echo 10.5) | sort -n -t. -k1,1 -k2,2 | head -n 1")
if lowerVersion is "
10.5" then
display dialog "Welcome to Leopard! (Or later!)"
else
display dialog "Tiger or earlier"
end if
if (higherVersion
--
Mark J. Reed <
email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden