summaryrefslogtreecommitdiff
path: root/macosx-setup.sh
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-09-22 02:59:53 -0700
committerGuy Harris <guy@alum.mit.edu>2016-09-22 10:00:40 +0000
commit4e53f5d975d184e6813d3dfb25b8c06fc046dbd7 (patch)
tree89edfaff232ad66d6a96f6f2eaf8d97c5fd1f271 /macosx-setup.sh
parentdedf926540ab3b828e314f0f7b8d2809a8f0d4f2 (diff)
downloadwireshark-4e53f5d975d184e6813d3dfb25b8c06fc046dbd7.tar.gz
Make it detect command-line-toos-only installations.
/usr/bin/xcodebuild is present, but appears not to work, if you have only the command-line tools for Xcode 8 installed, not Xcode 8 itself. Change-Id: I4a55e30f8afcc7e575e661d2b4ea944c967790ec Reviewed-on: https://code.wireshark.org/review/17856 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'macosx-setup.sh')
-rwxr-xr-xmacosx-setup.sh14
1 files changed, 6 insertions, 8 deletions
diff --git a/macosx-setup.sh b/macosx-setup.sh
index c296117cc4..685f0af317 100755
--- a/macosx-setup.sh
+++ b/macosx-setup.sh
@@ -2341,15 +2341,13 @@ if [ "$QT_VERSION" ]; then
# We need Xcode, not just the command-line tools, installed to build
# Qt.
#
- # XXX - is this sufficient to differentiate between "command-line
- # tools installed" and "Xcode installed"? The old
+ # At least with Xcode 8, /usr/bin/xcodebuild --help fails if only
+ # the command-line tools are installed and succeeds if Xcode is
+ # installed.
#
- # if ! /usr/bin/xcrun -find xcrun >/dev/null 2>&1
- #
- # test did *not* work with Xcode 8 - it thought you didn't have
- # Xcode installed even if you have Xcode 8 installed.
- #
- if [ ! -x /usr/bin/xcodebuild ]; then
+ if /usr/bin/xcodebuild -help >/dev/null 2>&1; then
+ :
+ else
echo "Please install Xcode first (should be available on DVD or from http://developer.apple.com/xcode/index.php)."
echo "The command-line build tools are not sufficient to build Qt."
exit 1