How to install Xcode Command Line Tools

后端 未结 13 1944
無奈伤痛
無奈伤痛 2020-11-22 01:08

How do I get the command-line build tools installed with the current Xcode/Mac OS X v10.8 (Mountain Lion) or later?

Unlike Xcode there is no installer, it\'s just a

13条回答
  •  再見小時候
    2020-11-22 01:36

    You can automate the installation of Command-Line Tools in bash. I needed to do this when I was automating the developer onboarding setup process.

    xcode-select --install && sleep 1
    osascript -e 'tell application "System Events"' -e 'tell process "Install Command Line Developer Tools"' -e 'keystroke return' -e 'click button "Agree" of window "License Agreement"' -e 'end tell' -e 'end tell'
    

提交回复
热议问题