summaryrefslogtreecommitdiff
path: root/scripts/macosx-build-dependencies.sh
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2013-04-22 19:18:36 (GMT)
committerMarius Kintel <marius@kintel.net>2013-04-22 19:18:36 (GMT)
commitf0ee85e17d474ab9119f82ee6f802d4634743b12 (patch)
treed2d9c1cd032e716788fc384a7f4590abcdf0795a /scripts/macosx-build-dependencies.sh
parent8bcb17ddfba83e228b66dad812317b291e8c8fc5 (diff)
Better OX version check
Diffstat (limited to 'scripts/macosx-build-dependencies.sh')
-rwxr-xr-xscripts/macosx-build-dependencies.sh14
1 files changed, 5 insertions, 9 deletions
diff --git a/scripts/macosx-build-dependencies.sh b/scripts/macosx-build-dependencies.sh
index d1b1a63..f3fbc2b 100755
--- a/scripts/macosx-build-dependencies.sh
+++ b/scripts/macosx-build-dependencies.sh
@@ -29,8 +29,6 @@ OPTION_LLVM=false
OPTION_CLANG=false
OPTION_GCC=false
OPTION_DEPLOY=false
-DETECTED_LION=false
-DETECTED_MOUNTAIN_LION=false
export QMAKESPEC=macx-g++
printUsage()
@@ -372,13 +370,11 @@ do
esac
done
-OSVERSION=`sw_vers -productVersion | cut -d. -f2`
-if [[ $OSVERSION -ge 8 ]]; then
+OSX_VERSION=`sw_vers -productVersion | cut -d. -f2`
+if (( $OSX_VERSION >= 8 )); then
echo "Detected Mountain Lion (10.8) or later"
- DETECTED_MOUNTAIN_LION=true
-elif [[ $OSVERSION -ge 7 ]]; then
+elif (( $OSX_VERSION >= 7 )); then
echo "Detected Lion (10.7) or later"
- DETECTED_LION=true
else
echo "Detected Snow Leopard (10.6) or earlier"
fi
@@ -392,7 +388,7 @@ elif $OPTION_GCC; then
USING_GCC=true
elif $OPTION_CLANG; then
USING_CLANG=true
-elif $DETECTED_LION; then
+elif (( $OSX_VERSION >= 7 )); then
USING_GCC=true
fi
@@ -416,7 +412,7 @@ elif $USING_CLANG; then
export QMAKESPEC=unsupported/macx-clang
fi
-if $DETECTED_MOUNTAIN_LION; then
+if (( $OSX_VERSION >= 8 )); then
echo "Setting build target to 10.6 or later"
MAC_OSX_VERSION_MIN=10.6
else
contact: Jan Huwald // Impressum