forked from DeepIT/XcodeColors
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add script to update Xcode compatibility
$ ./update_compat.sh
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
# show Xcode version and UUID | ||
xcodebuild -version | ||
uuid=$(defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID) | ||
echo "UUID $uuid" | ||
echo "" | ||
|
||
# check UUID | ||
plist=$(pwd)/XcodeColors/Info | ||
if [ -n "$(defaults read '$plist' | grep $uuid)" ] ; then | ||
echo "UUID is already added to Info.plist" | ||
exit | ||
fi | ||
|
||
# add UUID to .plist | ||
echo "Add UUID to '$plist'" | ||
defaults write '$plist' DVTPlugInCompatibilityUUIDs -array-add $uuid | ||
|
||
# show the result | ||
defaults read '$plist' |