Code

* packaging/macosx/Resources/openDoc: Fix a bug with the path being set
[inkscape.git] / packaging / macosx / Resources / openDoc
1 #!/bin/sh
2 #
3 # Author: Aaron Voisine <aaron@voisine.org>
4 # Inkscape Modifications: Michael Wybrow <mjwybrow@users.sourceforge.net>
6 CWD="`dirname \"$0\"`"
8 # System version: 3 for Panther, 4 for Tiger, 5 for Leopard
9 export VERSION=`/usr/bin/sw_vers | grep ProductVersion | cut -f2 -d'.'`
11 if [[ $VERSION -le 4 ]]; then
12         export "DISPLAY=`cat /tmp/display.$UID`"
13 fi
15 BASE="`echo "$0" | sed -e 's/\/Contents\/Resources\/openDoc/\//'`"
16 cd "$BASE"
17 exec "$CWD/bin/inkscape" "$@"