diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-04-11 14:41:28 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-04-11 14:41:28 (GMT) |
commit | 8350a171018499ccf645a5b122930036fc16980a (patch) | |
tree | a88d46fe2cc04bd0186a169d360cae572b68dfeb /Modules/CPack.RuntimeScript.in | |
parent | 94f40300e8ca9d181a15a03725525bc498f8465d (diff) | |
download | CMake-8350a171018499ccf645a5b122930036fc16980a.zip CMake-8350a171018499ccf645a5b122930036fc16980a.tar.gz CMake-8350a171018499ccf645a5b122930036fc16980a.tar.bz2 |
ENH: fix x11 launch script for leopord x11 is auto-started for us on that os.
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 1ce43bc..fc3444a 100755 --- a/Modules/CPack.RuntimeScript.in +++ b/Modules/CPack.RuntimeScript.in @@ -5,6 +5,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 ps -wx -ocommand | grep -e '[X]11.app' > /dev/null if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then echo "rm -f ~/.xinitrc" > ~/.xinitrc @@ -42,4 +62,5 @@ echo "$@" > /tmp/arguments.log if echo $1 | grep -- "^-psn_"; then shift fi +fi exec "$CWD/bin/@CPACK_EXECUTABLE_NAME@" "$@" > /tmp/slicer.output 2>&1 |