summaryrefslogtreecommitdiffstats
path: root/packaging/macosx/Resources/script
diff options
context:
space:
mode:
authorMenTaLguY <mental@rydia.net>2006-01-16 02:36:01 +0000
committermental <mental@users.sourceforge.net>2006-01-16 02:36:01 +0000
commit179fa413b047bede6e32109e2ce82437c5fb8d34 (patch)
treea5a6ac2c1708bd02288fbd8edb2ff500ff2e0916 /packaging/macosx/Resources/script
downloadinkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.tar.gz
inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.zip
moving trunk for module inkscape
(bzr r1)
Diffstat (limited to 'packaging/macosx/Resources/script')
-rwxr-xr-xpackaging/macosx/Resources/script35
1 files changed, 35 insertions, 0 deletions
diff --git a/packaging/macosx/Resources/script b/packaging/macosx/Resources/script
new file mode 100755
index 000000000..fb67e950c
--- /dev/null
+++ b/packaging/macosx/Resources/script
@@ -0,0 +1,35 @@
+#!/bin/sh
+#
+# Author: Aaron Voisine <aaron@voisine.org>
+# Inkscape Modifications: Michael Wybrow <mjwybrow@users.sourceforge.net>
+
+CWD="`dirname \"$0\"`"
+
+ps -wx -ocommand | grep -e '[X]11' > /dev/null
+if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then
+ echo "rm -f ~/.xinitrc" > ~/.xinitrc
+ sed 's/xterm/# xterm/' /usr/X11R6/lib/X11/xinit/xinitrc >> ~/.xinitrc
+fi
+
+cp -f "$CWD/bin/getdisplay.sh" /tmp/
+rm -f /tmp/display.$UID
+open-x11 /tmp/getdisplay.sh || \
+open -a XDarwin /tmp/getdisplay.sh || \
+echo ":0" > /tmp/display.$UID
+
+while [ "$?" == "0" -a ! -f /tmp/display.$UID ]; do
+ sleep 1
+done
+export "DISPLAY=`cat /tmp/display.$UID`"
+
+ps -wx -ocommand | grep -e '[X]11' > /dev/null || exit 11
+
+VERSION=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 -d'.'`
+if [ "$VERSION" -eq "4" ]; then
+ # We're on tiger. So need to update fc-cache if it hasn't been done
+ test -f ~/.inkscape/.fccache || exit 12
+fi
+
+BASE="`echo "$0" | sed -e 's/\/Contents\/Resources\/script/\//'`"
+cd "$BASE"
+exec "$CWD/bin/inkscape" "$@"