brew/package/scripts/preinstall

17 lines
349 B
Plaintext
Raw Normal View History

2022-12-19 17:43:51 +01:00
#!/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
2022-12-19 17:43:51 +01:00
fi
if ! /usr/bin/xcode-select --install; then
printf "Failed to install CommandLine Tools!"
exit 1
fi