-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Remove Alcatraz from Xcode skipped plugins list on install #315
Remove Alcatraz from Xcode skipped plugins list on install #315
Conversation
6db011b
to
ecf1d67
Compare
ecf1d67
to
6c2ebde
Compare
Rebased this PR on top of master. Could you take a look? Thanks! |
6c2ebde
to
d5e1ddf
Compare
XCODE_VERSION="$(xcrun xcodebuild -version | head -n1 | awk '{ print $2 }')" | ||
PLIST_PLUGINS_KEY="DVTPlugInManagerNonApplePlugIns-Xcode-${XCODE_VERSION}" | ||
BUNDLE_ID="com.mneorr.Alcatraz" | ||
TMP_FILE="/tmp/${BUNDLE_ID}.xcode-defaults" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should add $(random)
somewhere in here to avoid collisions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kattrali not sure random
is installed on OSX by default.
mktemp
might work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh right, echo $RANDOM
LGTM, added inline comments. |
/usr/libexec/PlistBuddy -c "delete skipped:$BUNDLE_ID" "$TMP_FILE" > /dev/null 2>&1 && { | ||
pgrep Xcode > /dev/null && { echo 'An instance of Xcode is currently running. Please close Xcode before installing Alcatraz.'; exit 1; } | ||
defaults write -app Xcode "$PLIST_PLUGINS_KEY" "$(< $TMP_FILE)" | ||
echo 'Alcatraz was removed from Xcode'\''s skipped plugins list. Next time you start Xcode select "Load Bundle" when prompted.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible, it'd be appreciated if length could be <80
d5e1ddf
to
82871de
Compare
+ Fix coding style
82871de
to
25c4b3d
Compare
I made the requested changes:
|
👍 Awesome! Thanks @guillaume-algis, looks good. |
…tall Remove Alcatraz from Xcode skipped plugins list on install
Related to #281, #282, #303 and probably a whole bunch of other issues.
This is very similar #282, but just removes Alcatraz from the skipped plugins list instead of un-blocking everything.
I also took the chance to add "strict flags" to the sh script, and echoing the current selected version of Xcode after install.