dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 60a66f79df9feb2e30d0afe540d1fafc0cee56ad
parent 1b5e94ccac62093513a81acf938ca28901f82734
Author: Anders Damsgaard <andersd@riseup.net>
Date:   Mon,  2 Oct 2017 22:32:17 -0400

double verification of command line tools status

Diffstat:
Minit/10_macos_xcode.sh | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/init/10_macos_xcode.sh b/init/10_macos_xcode.sh @@ -3,6 +3,12 @@ # OSX-stuff only [[ "$(uname)" != "Darwin" ]] && return 1 -if [[ ! -d "$('xcode-select' -print-path 2>/dev/null)" ]]; then - sudo xcode-select -switch /usr/bin +# check if command line tools are installed +xcode-select --print-path >/dev/null 2>&1 +xcodestatus=$? +gcc --version >/dev/null 2>&1 +gccstatus=$? +if [[ $xcodestatus -ne 0 || $gccstatus -ne 0 ]]; then + echo "xcode status: $xcodestatus, gcc status: $gccstatus" + sudo xcode-select --install fi