-
-
Save kostiakoval/18ab11e35a3d57b17e1a to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
#ID='A16FF353-8441-459E-A50C-B071F53F51B7' # Xcode 6.2 | |
#ID='992275C1-432A-4CF7-B659-D84ED6D42D3F' # Xcode 6.3 | |
ID='9F75337B-21B4-4ADC-B558-F9CADF7073A7' # Xcode 6.3 GM | |
PLIST_BUDDY=/usr/libexec/PlistBuddy | |
function add_compatibility() { | |
"$PLIST_BUDDY" -c "Add DVTPlugInCompatibilityUUIDs:10 string $2" \ | |
"$1/Contents/Info.plist" | |
} | |
function has_compatibility() { | |
$PLIST_BUDDY -c 'Print DVTPlugInCompatibilityUUIDs' \ | |
"$1/Contents/Info.plist"|grep -q "$2" | |
return $? | |
} | |
cd "$HOME/Library/Application Support/Developer/Shared/Xcode/Plug-ins" | |
for file in `ls -d *` | |
do | |
if `has_compatibility "$file" $ID` | |
then | |
true | |
else | |
echo "Plugin $file is now compatible with the newest Xcode" | |
add_compatibility "$file" $ID | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment