Last active
October 3, 2019 10:36
-
-
Save lasote/b0f4e8b0de7777f01aeddb6ffae5670c to your computer and use it in GitHub Desktop.
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 | |
echo "Xcode CLI tools not found. Installing them..." | |
touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress; | |
PROD=$(softwareupdate -l | | |
grep "\*.*Command Line" | | |
head -n 1 | awk -F"*" '{print $2}' | | |
sed -e 's/^ *//' | | |
tr -d '\n') | |
echo "Command: $PROD" | |
softwareupdate -i "$PROD"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment