How to read out plist information and compare version number?
How to read out plist information and compare version number?
- Subject: How to read out plist information and compare version number?
- From: David Schara <email@hidden>
- Date: Thu, 13 Nov 2008 17:59:33 +0100
Hi,
I tried to create a bash file that should be able to read out an
application version number which is located in a plist and compare it to
a different version number. Both version numbers have the same
appearance: x.y.zzz
This is my code:
______
#!/bin/sh
# postflight
VERSION_NEW="0.5.002"
VERSION=defaults read "/Applications/My.app/Contents/Info"
"CFBundleShortVersionString"
echo $VERSION
if[$VERSION_NEW -lt $VERSION]; then
echo "Version is bigger"
else
echo "Version is smaler"
fi
______
I know there must be something wrong with the if-clause because I try to
compare two Strings , but I have no clue how to treat a version number
correctly. Also I get a strange error message (read:
`/Applications/Maschine.app/Contents/Info': not a valid identifier).
What is wrong there?
THX
_______________________________________________
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