brew/package/scripts/preinstall
2022-12-21 13:37:24 +01:00

17 lines
349 B
Bash
Executable File

#!/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