ENH: fix x11 launch script for leopord x11 is auto-started for us on that os.
This commit is contained in:
parent
94f40300e8
commit
8350a17101
|
@ -5,6 +5,26 @@
|
||||||
CWD="`dirname \"$0\"`"
|
CWD="`dirname \"$0\"`"
|
||||||
TMP=/tmp/$UID/TemporaryItems
|
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
|
ps -wx -ocommand | grep -e '[X]11.app' > /dev/null
|
||||||
if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then
|
if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then
|
||||||
echo "rm -f ~/.xinitrc" > ~/.xinitrc
|
echo "rm -f ~/.xinitrc" > ~/.xinitrc
|
||||||
|
@ -42,4 +62,5 @@ echo "$@" > /tmp/arguments.log
|
||||||
if echo $1 | grep -- "^-psn_"; then
|
if echo $1 | grep -- "^-psn_"; then
|
||||||
shift
|
shift
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
exec "$CWD/bin/@CPACK_EXECUTABLE_NAME@" "$@" > /tmp/slicer.output 2>&1
|
exec "$CWD/bin/@CPACK_EXECUTABLE_NAME@" "$@" > /tmp/slicer.output 2>&1
|
||||||
|
|
Loading…
Reference in New Issue