Skip to content

Instantly share code, notes, and snippets.

@kakikubo
Created December 10, 2015 02:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kakikubo/0900bc2f85f01549f317 to your computer and use it in GitHub Desktop.
Save kakikubo/0900bc2f85f01549f317 to your computer and use it in GitHub Desktop.
Xcodeをバージョンアップした際に、プラグインも新バージョン側に適用させる
#!/usr/bin/env sh
UUID=$(defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID)
echo Xcode DVTPlugInCompatibilityUUID is $UUID
for MyPlugin in ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins/*
do
UUIDs=$(defaults read "$MyPlugin"/Contents/Info DVTPlugInCompatibilityUUIDs)
echo $MyPlugin
if echo "${UUIDs[@]}" | grep -w "$UUID" &>/dev/null; then
echo "The plug-in's UUIDs has contained the Xcode's UUID."
else
defaults write "$MyPlugin"/Contents/Info DVTPlugInCompatibilityUUIDs -array-add $UUID
echo "Refresh the plug-in completed."
fi
done
echo "Done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment