Last active
March 22, 2016 00:49
-
-
Save f213/cf3166d547f1a6a685ab to your computer and use it in GitHub Desktop.
Stupidly modify old Apple Mail plugins to fit you current system version
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
#!/bin/bash | |
# | |
# Copyright (c) 2015, Fedor Borshev, <[email protected]> | |
# | |
# Permission to use, copy, modify, and/or distribute this software for any | |
# purpose with or without fee is hereby granted, provided that the above | |
# copyright notice and this permission notice appear in all copies. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
PlistBuddy="/usr/libexec/PlistBuddy" | |
if [ $# -eq 0 ]; | |
then | |
echo Usage: $0 "bundle-dir" | |
exit 1 | |
fi; | |
dir=$1 | |
if [ ! -d $dir ]; | |
then | |
echo Directory $dir not found | |
exit 1 | |
fi; | |
plist="$dir/Contents/Info.plist" | |
if [ ! -f $plist ]; | |
then | |
echo File $plist is not found, Maybe $dir is not a mailbundle? | |
exit 1 | |
fi; | |
bundleVersion=`defaults read /Applications/Mail.app/Contents/Info PluginCompatibilityUUID` | |
$PlistBuddy -c "add :SupportedPluginCompatibilityUUIDs:0 string $bundleVersion" $plist | |
echo Your mail.app UDID $bundleVersion has beed added. | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment