Skip to content
Permalink
Browse files

Check path of xcode-select for environment setup

  • Loading branch information
yous committed Nov 12, 2019
1 parent e6feda2 commit 25ef5fcbccb0eda4191b8bc758c8165f4a14ac3c
Showing with 9 additions and 2 deletions.
  1. +9 −2 Makefile
@@ -2,16 +2,23 @@ all:
@echo 'Available commands:'
@echo ' init -- setup a development environment'
@echo ' format -- format code style with swiftformat'
@echo ' xcode-select -- set the active developer directory to Xcode'
@echo ' brew-install -- install required Homebrew formulae'
@echo ' gem-install -- install required gems'

init: brew-install gem-install
init: xcode-select brew-install gem-install
git submodule update --init --recursive
pod install --repo-update

format:
swiftformat OSXCore/ OSX/ GureumTests/ Preferences/ OSXTestApp/

xcode-select:
@if [ "$(shell xcode-select -p)" = '/Library/Developer/CommandLineTools' ]; then \
echo 'sudo xcode-select -s /Applications/Xcode.app/Contents/Developer'; \
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer; \
fi

brew-install:
@command -v brew >/dev/null || { echo 'Error: Homebrew is not installed. See https://brew.sh'; exit 1; }
@if ! command -v shellcheck >/dev/null; then \
@@ -33,4 +40,4 @@ gem-install:
gem install xcpretty || { echo 'Error: gem-install failed. Try sudo make gem-install.'; exit 1; }; \
fi

.PHONY: all init format brew-install gem-install
.PHONY: all init format xcode-select brew-install gem-install

0 comments on commit 25ef5fc

Please sign in to comment.
You can’t perform that action at this time.