Shell script to detect OS version
Shell script to detect OS version
- Subject: Shell script to detect OS version
- From: Chris Waldrip <email@hidden>
- Date: Tue, 12 Jul 2005 20:35:42 -0400
I'm not a power programmer (Perl gives me a headache), and have a
passing knowledge of shell scripting.
I've got several installers that add icons to the Dock, for our users
in the field. While none of our users have been upgraded to 10.4 yet,
I've already modified my scripts to convert the dock.plist to xml, do
a defaults write to add the info, and then convert back to binary.
But the problem is that 10.3 errors on the plutil command (like you'd
expect) and 10.4 requires that command.
It looks like the best solution is to modify my shell script to run
one part of the script if it's a release prior to 10.4.0, and another
if its 10.4.0 or later. But there's the rub... I'm not tuned into how
to detect the OS version from bash.
Or!
Is there a way in Iceberg (btw, fantastic app Stépane) to run
different scripts based on OS version? I see that there's a way to
detect OS version from the Script requirements, but it's an all or
nothing approach (do run if, don't run if).
Suggestions?
-Chris Waldrip
DNG Systems Engineer
CNN Digital News Gathering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden