build script failed

I am trying to use build script to build a product. The following is something I put in the script.

XCODEBUILD="/usr/bin/xcodebuild"

XCODE_VERSION=$((${XCODEBUILD} -version 2>/dev/null || echo 'V -1') | head -n 1 | awk '{ print $2 }')

But I got the error from the above line.

I double checked and make sure that I installed the Xcode command line tool on my Mac laptop.

Any advice for this issue?

Thanks.

What does xcodebuild -version print? If that succeeds, then the issue here is which the other components of your shell script.

— Ed Ford,  DTS Engineer

build script failed
 
 
Q