Created
December 10, 2015 02:15
-
-
Save kakikubo/0900bc2f85f01549f317 to your computer and use it in GitHub Desktop.
Xcodeをバージョンアップした際に、プラグインも新バージョン側に適用させる
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
#!/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