Last active
November 23, 2017 16:05
-
-
Save MauricioKruijer/1fe4252cc74d6c6117b7241bbcc93da1 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/sh | |
# Thanks dropbox, this db is read-only. You need to disable SIP to do this stuff now... `csrutil disable ` | |
# sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "INSERT INTO access VALUES('kTCCServiceAccessibility','com.apple.Terminal',0,1,1,NULL,NULL);" | |
check=$(xcode-select --install 2>&1) | |
echo $check | |
str="xcode-select: note: install requested for command line developer tools" | |
while [[ "$check" == "$str" ]]; | |
do | |
echo "--> Installing command line developer tools..." | |
sleep 1 | |
osascript >/dev/null 2>&1 <<END | |
activate application "Install Command Line Developer Tools" | |
tell application "Install Command Line Developer Tools" | |
activate | |
tell application "System Events" | |
click button "Install" of window 1 of process "Install Command Line Developer Tools" | |
click button "Agree" of window "License Agreement" of process "Install Command Line Developer Tools" | |
end tell | |
end tell | |
END | |
sleep 60 | |
check=$(xcode-select --install 2>&1) | |
done | |
echo "--> Command line developer tools install finished!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment