mirror of
https://github.com/munki/munki.git
synced 2026-04-23 21:40:25 -05:00
Changed from #!/usr/bin/env python to #!/usr/bin/python because we need to use Apple's installed Python, and not whatever python the user happens to be using...
Added support for CFBundleVersion when CFBundleShortVersionString is missing. git-svn-id: http://munki.googlecode.com/svn/trunk@209 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/python
|
||||
# encoding: utf-8
|
||||
#
|
||||
# Copyright 2009 Greg Neagle.
|
||||
@@ -126,6 +126,8 @@ def getiteminfo(itempath):
|
||||
infodict['CFBundleIdentifier'] = pl['CFBundleIdentifier']
|
||||
if 'CFBundleShortVersionString' in pl:
|
||||
infodict['CFBundleShortVersionString'] = pl['CFBundleShortVersionString']
|
||||
elif 'CFBundleVersion' in pl:
|
||||
infodict['CFBundleShortVersionString'] = pl['CFBundleVersion']
|
||||
if 'LSMinimumSystemVersion' in pl:
|
||||
infodict['minosversion'] = pl['LSMinimumSystemVersion']
|
||||
elif 'SystemVersionCheck:MinimumSystemVersion' in pl:
|
||||
@@ -137,6 +139,8 @@ def getiteminfo(itempath):
|
||||
pl = getBundleInfo(itempath)
|
||||
if 'CFBundleShortVersionString' in pl:
|
||||
infodict['CFBundleShortVersionString'] = pl['CFBundleShortVersionString']
|
||||
elif 'CFBundleVersion' in pl:
|
||||
infodict['CFBundleShortVersionString'] = pl['CFBundleVersion']
|
||||
|
||||
elif itempath.endswith("Info.plist") or itempath.endswith("version.plist"):
|
||||
infodict['type'] = 'plist'
|
||||
@@ -145,6 +149,8 @@ def getiteminfo(itempath):
|
||||
pl = FoundationPlist.readPlist(itempath)
|
||||
if 'CFBundleShortVersionString' in pl:
|
||||
infodict['CFBundleShortVersionString'] = pl['CFBundleShortVersionString']
|
||||
elif 'CFBundleVersion' in pl:
|
||||
infodict['CFBundleShortVersionString'] = pl['CFBundleVersion']
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user