summaryrefslogtreecommitdiff
path: root/tools/osx_packaging/init
diff options
context:
space:
mode:
Diffstat (limited to 'tools/osx_packaging/init')
-rwxr-xr-xtools/osx_packaging/init16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/osx_packaging/init b/tools/osx_packaging/init
new file mode 100755
index 0000000000..65c819550e
--- /dev/null
+++ b/tools/osx_packaging/init
@@ -0,0 +1,16 @@
+#!/bin/sh
+#
+# Author: Aaron Voisine <aaron@voisine.org>
+
+CWD="`(cd \"\`dirname \\\"$0\\\"\`\"; echo $PWD)`"
+
+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
+
+open -a X11 || open -a XDarwin
+
+export "FONTCONFIG_PATH=$CWD/etc/fonts"
+exec "$CWD/bin/cache-fonts"