Created
July 16, 2012 19:32
-
-
Save rockpapergoat/3124538 to your computer and use it in GitHub Desktop.
resolve missing bundle identifier issues by adding them to plists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# 2012-07-16, resolve missing bundle identifier issues by adding them to plists | |
# add your problem pkg receipts and values to the hash below. | |
identifiers = { | |
"vpnclient-api.pkg" => "com.cisco.vpnclient-api", | |
"vpnclient-bin.pkg" => "com.cisco.vpnclient-bin", | |
"vpnclient-kext.pkg" => "com.cisco.vpnclient-kext", | |
"vpnclient-profiles.pkg" => "com.cisco.vpnclient-profiles", | |
"vpnclient-startup.pkg" => "com.cisco.vpnclient-startup", | |
"vpnclient-gui.pkg" => "com.cisco.vpnclient-gui", | |
"Flip4Mac Web Plugins.pkg" => "net.telestream.flip4macwebplugins", | |
"Flip4Mac QuickTime Components.pkg" => "net.telestream.flip4macqtcomponents", | |
"PGP.pkg" => "com.pgp.pgp" | |
} | |
def fix_receipts(receipts) | |
path = "/Library/Receipts" | |
if receipts.is_a?(Hash) | |
receipts.each_pair do |k,v| | |
if File.exists?("#{path}/#{k}") | |
puts "fixing #{k}" | |
%x(/usr/bin/defaults write #{path}/\"#{k}\"/Contents/Info CFBundleIdentifier #{v}) | |
end | |
end | |
end | |
end | |
fix_receipts(identifiers) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment