Skip to main content
2 of 3
english
athena
  • 12.5k
  • 8
  • 61
  • 137
if type xcode-select >&- && xpath=$( xcode-select --print-path ) &&
   test -d ${xpath} && test -x ${xpath} ; then
   #... is correctly installed
else
   #... isn't correctly installed
fi

Strangely, the --print-path isn't documented in old Xcode versions but is working as -print-path. On the other hand, the -p option doesn't have this compatibility.

athena
  • 12.5k
  • 8
  • 61
  • 137