Trying to install Command Line Tools without Xcode
Solution 1:
Maybe things have changed since this question was originally asked but I had no trouble downloading command-line tools from here:
https://developer.apple.com/download/more/
(I did this after deleting XCode to save about 13 GB of disk space).
Solution 2:
I don't think there's a solution since opendiff
calls the GUI program FileMerge which ships with Xcode.
You would want to use another diff tool - perhaps the gnu tools from homebrew or my favorite paid diff tool that has a command line tool - ksdiff
from Kaleidoscope.
- https://kaleidoscopeapp.com
It's a powerhouse of GUI diff goodness for when the command line options don't cut through the task you need done.
Solution 3:
You can try solution from here: Github script to install tools from Xcode 3.2.6
I used this to have FileMerge.app without Xcode and works even on High Sierra.
Solution 4:
I spend over 3 hours fixing problem with osx 10.14
$ sudo -s
$ 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')
softwareupdate -i "$PROD" --verbose;