- If you don't have a free Apple developer account, register for one
- Download the "Command Line Tools for Xcode" appropriate for your version of OSXFor me, that was "Command Line Tools (OS X Mountain Lion) for Xcode - April 2014"
- Copy the dmg file to your remoteIn the following command, I'm using scp to securely copy the file from my local computer to the remote named
remote
$ scp ~/Downloads/command_line_tools_for_osx_mountain_lion_april_2014.dmg remote:Downloads/
- ssh to your remote
$ ssh remote
- mount the dmg file on the remoteHere, I'm using hdiutil to mount the image
$ hdiutil attach ~/Downloads/command_line_tools_for_osx_mountain_lion_april_2014.dmg
- install the package contained in the dmgHere, installer must be run with
sudo
because this package needs to be installed on the root file system$ cd /Volumes/Command\ Line\ Tools\ \(Mountain\ Lion\) $ sudo installer -pkg Command\ Line\ Tools\ \(Mountain\ Lion\).mpkg -target /
- unmount the dmg file
$ hdiutil detach /Volumes/Command\ Line\ Tools\ \(Mountain\ Lion\)
- delete the dmg file from the remote; optionalI see no purpose keeping it around, but you can if you want.
$ rm ~/Downloads/command_line_tools_for_osx_mountain_lion_april_2014.dmg
-
Use the below to agree to the Xcode/iOS license:
sudo xcodebuild -license
Monday, April 11, 2016
[Jenkins] Install Xcode command line tools over SSH
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment