10_macos_xcode.sh (375B)
1 #!/usr/bin/env bash 2 3 # OSX-stuff only 4 [[ "$(uname)" != "Darwin" ]] && return 1 5 6 # check if command line tools are installed 7 xcode-select --print-path >/dev/null 2>&1 8 xcodestatus=$? 9 gcc --version >/dev/null 2>&1 10 gccstatus=$? 11 if [[ $xcodestatus -ne 0 || $gccstatus -ne 0 ]]; then 12 echo "xcode status: $xcodestatus, gcc status: $gccstatus" 13 sudo xcode-select --install 14 fi