Created
April 20, 2011 04:41
-
-
Save netj/930384 to your computer and use it in GitHub Desktop.
A script for fixing disabled Mail.app bundles due to SupportedPluginCompatibilityUUIDs
This file contains 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 bash | |
# A script for fixing disabled Mail.app bundles due to SupportedPluginCompatibilityUUIDs | |
# Author: Jaeho Shin <[email protected]> | |
# Created: 2011-03-24 | |
# See-Also: http://stib.posterous.com/how-to-fix-unsupported-plugins-after-upgradin | |
set -eu | |
newMailUUID=$(defaults read /Applications/Mail.app/Contents/Info PluginCompatibilityUUID) | |
newMsgUUID=$(defaults read /System/Library/Frameworks/Message.framework/Resources/Info PluginCompatibilityUUID) | |
cd ~/Library/Mail | |
for bundle in "Bundles"*"("*")"/*.mailbundle; do | |
[ -d "$bundle" ] || continue | |
if [ -w "$bundle"/Contents/Info.plist ]; then | |
echo "$bundle: Re-enabling with fixed SupportedPluginCompatibilityUUIDs" | |
defaults write "$PWD"/"$bundle"/Contents/Info SupportedPluginCompatibilityUUIDs -array-add "$newMailUUID" | |
defaults write "$PWD"/"$bundle"/Contents/Info SupportedPluginCompatibilityUUIDs -array-add "$newMsgUUID" | |
mv "$bundle" Bundles/ | |
else | |
echo "$bundle: Skipping (Info.plist not writable)" | |
fi | |
done | |
rmdir -p "Bundles"*"("*")" 2>/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It can be easily fixed by removing line 9 and 17. The script was tested on osx 10.9.3 and worked like a charm after this small adaption.
The script should become: