#!/bin/bash # Checked for installed CLT if [[ -e "/Library/Developer/CommandLineTools/usr/bin/git" ]]; then exit 0 fi if [[ -z "$COMMAND_LINE_INSTALL" ]]; then printf "No auto-install of CommandLine Tools in headless install!" exit 1 fi if ! /usr/bin/xcode-select --install; then printf "Failed to install CommandLine Tools!" exit 1 fi