diff options
author | David Cole <david.cole@kitware.com> | 2009-01-21 16:54:30 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2009-01-21 16:54:30 (GMT) |
commit | c647ed54d9c071393e95b204aac2bb975ec95fe9 (patch) | |
tree | de2b8f9c339804962fdf912d9837410cec5e3e60 /Modules/CPack.RuntimeScript.in | |
parent | d2f27558dfe6ab7c3a36b631249c9e3b89e9eb28 (diff) | |
download | CMake-c647ed54d9c071393e95b204aac2bb975ec95fe9.zip CMake-c647ed54d9c071393e95b204aac2bb975ec95fe9.tar.gz CMake-c647ed54d9c071393e95b204aac2bb975ec95fe9.tar.bz2 |
BUG: Fix issue #7833: Add file extension handling to CPack generated installers for OSXX11 applications. Also modify the X11 test to build such an installer on Mac builds that test CPack and have X11 available. Thanks to Wes Turner for the patch.
Diffstat (limited to 'Modules/CPack.RuntimeScript.in')
-rwxr-xr-x | Modules/CPack.RuntimeScript.in | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Modules/CPack.RuntimeScript.in b/Modules/CPack.RuntimeScript.in index 72dd14e..eaecdd8 100755 --- a/Modules/CPack.RuntimeScript.in +++ b/Modules/CPack.RuntimeScript.in @@ -6,6 +6,26 @@ CWD="`dirname \"$0\"`" TMP=/tmp/$UID/TemporaryItems version=`sw_vers -productVersion` +if [ "$?" == "0" ]; then + major=${version%%\.*} + rest=${version#*\.} + minor=${rest%%\.*} + build=${rest#*\.} +else + major=10 + minor=4 + build=0 +fi + +echo $version +echo "Major = $major" +echo "Minor = $minor" +echo "Build = $build" + + +# if 10.5 or greater, then all the open-x11 stuff need not occur +if ((( $major < 10 )) || ((( $major == 10)) && (( $minor < 5 )))); then +version=`sw_vers -productVersion` if [ "$?" = "0" ]; then major=${version%%\.*} rest=${version#*\.} @@ -42,6 +62,7 @@ else echo \$DISPLAY > "$TMP/display" fi __END_OF_GETDISPLAY_SCRIPT__ +fi chmod +x "$TMP/getdisplay.sh" rm -f $TMP/display open-x11 $TMP/getdisplay.sh || \ |