|author||Guy Harris <firstname.lastname@example.org>||2014-12-20 09:47:01 -0800|
|committer||Guy Harris <email@example.com>||2014-12-20 17:47:50 +0000|
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 <firstname.lastname@example.org>
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
@@ -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 \
@@ -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.