This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# headless install of xcode command line tools | |
if ! xcode-select -p &> /dev/null; then | |
touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress; | |
CLTX=$(softwareupdate --list | \ | |
grep "\*.*Command Line Tools" | \ | |
tail -n 1 | \ | |
awk -F"Label: " '{print $2}' \ | |
) |