|
|
@@ -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
|