Skip to content

Instantly share code, notes, and snippets.

@DmitrySeredinov
Forked from neonichu/update_xcode_plugins
Created June 27, 2014 13:48
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 DmitrySeredinov/637fe509b6b08c52383b to your computer and use it in GitHub Desktop.
Save DmitrySeredinov/637fe509b6b08c52383b to your computer and use it in GitHub Desktop.
#!/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" 640F884E-CE55-4B40-87C0-8869546CAB7A`
then
if `has_compatibility "$file" AD68E85B-441B-4301-B564-A45E4919A6AD`
then
true
else
echo "Plugin $file is now compatible with Xcode 6.0 beta"
add_compatibility "$file" AD68E85B-441B-4301-B564-A45E4919A6AD
fi
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment