summaryrefslogtreecommitdiff
path: root/tools/osx_packaging/init
blob: 65c819550ea5baea8f4d755c2d3c241119cad762 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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"