Created
February 14, 2014 19:43
-
-
Save brysgo/9007731 to your computer and use it in GitHub Desktop.
Install xcode command line tools without prompt
This file contains hidden or 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
do shell script "xcode-select --install" | |
do shell script "sleep 1" | |
tell application "System Events" | |
tell process "Install Command Line Developer Tools" | |
keystroke return | |
click button "Agree" of window "License Agreement" | |
end tell | |
end tell |
xcode-select --install > /dev/null 2>&1
if [ 0 == $? ]; then
sleep 1
osascript <<EOD
tell application "System Events"
tell process "Install Command Line Developer Tools"
keystroke return
click button "Agree" of window "License Agreement"
end tell
end tell
EOD
else
echo "Command Line Developer Tools are already installed!"
fi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't know what this does anymore as it is from seven years ago, but it is an apple script so you will need to run it with applescript and not zsh