path: root/macosx-setup.sh
diff options
authorGuy Harris <guy@alum.mit.edu>2014-12-20 09:47:01 -0800
committerGuy Harris <guy@alum.mit.edu>2014-12-20 17:47:50 +0000
commitabd90c32bbba16d848905b15f2b6ccfc353c8e41 (patch)
tree6b91579698592e8527abac71abe4873a6b57d4fe /macosx-setup.sh
parent9ba9cd83a4f72339b15aebbc1fbdde32f08ef3bc (diff)
Fix handling of 3-component OS version numbers.
Get rid of doubled square brackets (what were those for?), and match dots in the version number with "\.", so we only match dots. This fixes the handling of version numbers such as 10.10.1. (A 2-component version number doesn't match, but that's OK - the sed command doesn't use -n, so that just means it's unchanged by the command.) Change-Id: I3046133de732c80410592272d1f7b961a64d9289 Reviewed-on: https://code.wireshark.org/review/5915 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'macosx-setup.sh')
1 files changed, 3 insertions, 2 deletions
diff --git a/macosx-setup.sh b/macosx-setup.sh
index bd5a6141fc..f7418af0f0 100755
--- a/macosx-setup.sh
+++ b/macosx-setup.sh
@@ -443,7 +443,8 @@ fi
# If we have SDKs available, the default target OS is the major version
-# of the one we're running; get that and strip off the third component.
+# of the one we're running; get that and strip off the third component
+# if present.
for i in /Developer/SDKs \
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs \
@@ -451,7 +452,7 @@ for i in /Developer/SDKs \
if [ -d "$i" ]
- min_osx_target=`sw_vers -productVersion | sed 's/\([[0-9]]*\).\([[0-9]]*\).[[0-9]]*/\1.\2/'`
+ min_osx_target=`sw_vers -productVersion | sed 's/\([0-9]*\)\.\([0-9]*\)\.[0-9]*/\1.\2/'`
# That's also the OS whose SDK we'd be using.