Skip to content

Instantly share code, notes, and snippets.

@wbroek
Forked from neonichu/update_xcode_plugins
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wbroek/fc9657a6c58dce23466d to your computer and use it in GitHub Desktop.
Save wbroek/fc9657a6c58dce23466d to your computer and use it in GitHub Desktop.
Make Xcode plugins compatible with latest Xcode installed on system (Xcode 6 atm)
#!/bin/sh
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" C4A681B0-4A26-480E-93EC-1218098B9AA0`
then
true
else
echo "Plugin $file is now compatible with Xcode 6.0 GM"
add_compatibility "$file" C4A681B0-4A26-480E-93EC-1218098B9AA0
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment