Browse Source

better Xcode CLI tools handling

Kyle P Davis 10 years ago
parent
commit
64afc37639
1 changed files with 1 additions and 1 deletions
  1. 1 1
      .profile

+ 1 - 1
.profile

@@ -50,12 +50,12 @@ export LESS="-FRX"
 ###############################################################################
 ###############################################################################
 
 
 _install_homebrew() {
 _install_homebrew() {
+	xcode-select --install 2>&1 | grep -q "already installed"  ||  exit
 	[ -d "$HOME/homebrew" ]  ||  (mkdir "$HOME/homebrew" 2>/dev/null  &&  curl -L "https://github.com/Homebrew/homebrew/tarball/master" | tar xz --strip 1 -C "$HOME/homebrew"  &&  brew update)
 	[ -d "$HOME/homebrew" ]  ||  (mkdir "$HOME/homebrew" 2>/dev/null  &&  curl -L "https://github.com/Homebrew/homebrew/tarball/master" | tar xz --strip 1 -C "$HOME/homebrew"  &&  brew update)
 	brew install caskroom/cask/brew-cask
 	brew install caskroom/cask/brew-cask
 }
 }
 
 
 _install_tools() {
 _install_tools() {
-	xcode-select --install  ||  true
 	_install_homebrew
 	_install_homebrew
 	[ -d "$HOME/liquidprompt" ]  ||  git clone "https://github.com/nojhan/liquidprompt.git" "$HOME/liquidprompt"
 	[ -d "$HOME/liquidprompt" ]  ||  git clone "https://github.com/nojhan/liquidprompt.git" "$HOME/liquidprompt"
 	which tmux >/dev/null  ||  brew install tmux
 	which tmux >/dev/null  ||  brew install tmux