Skip to content

Commit

Permalink
xcode-toggle alt-name
Browse files Browse the repository at this point in the history
  • Loading branch information
fbartho committed Dec 26, 2020
1 parent bda5aae commit 950d8da
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions bin/xcode-toggle
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
#!/bin/bash

`xcode-select -p | grep -i beta > /dev/null`
ALT_XCODE_NAME="-10.3"
ALT_XCODE_GREP="10"

`xcode-select -p | grep -i $ALT_XCODE_GREP > /dev/null`
if [ $? -eq 0 ]
then
echo "Using beta. Switching to release."
echo "Using Xcode$ALT_XCODE_NAME. Switching to release."
sudo xcode-select -s /Applications/Xcode.app
else
echo "Using release. Switching to beta."
sudo xcode-select -s /Applications/Xcode-beta.app
echo "Using release. Switching to Xcode$ALT_XCODE_NAME."
sudo xcode-select -s "/Applications/Xcode$ALT_XCODE_NAME.app"
fi
xcode-select -p

0 comments on commit 950d8da

Please sign in to comment.