updated on Tue Jan 17 04:01:13 UTC 2012
[aur-mirror.git] / th08 / th08.sh
blob4fe6c5b4d30d5ba54e82242e01264c35ca47d7e3
1 #!/bin/bash
3 export WINEPREFIX="$HOME/.th08/wine"
4 export WINEDLLOVERRIDES="mshtml="
6 if [ ! -d "$HOME"/.th08 ] ; then
7 mkdir -p "$HOME"/.th08/wine || exit 1
8 ln -s /usr/share/th08/th08.exe "$HOME"/.th08/th08.exe || exit 1
9 ln -s /usr/share/th08/custom.exe "$HOME"/.th08/custom.exe || exit 1
10 ln -s /usr/share/th08/th08tr.dat "$HOME"/.th08/th08tr.dat || exit 1
12 if [ ! -f "$HOME"/.th08/th08.cfg ] ; then
13 echo "AAABAAIABAD//////////wMAAAABAAgAWAJYAgIDAAIBAQAAAgAAZFAAAAAAAAAAAAAAAAAAAAABCAAA"|base64 -d >~/.th08/th08.cfg
15 if [ "" != "`whereis timidity|grep '/usr/bin'`" ] ; then
16 if [ "" == "`ps -A|grep timidity`" ] ; then
17 timidity -iA &
18 myins="true"
21 # this sed is to make sure directinput is always activaded.
22 # the controls can be a bit unresponsive without it
23 mv ~/.th08/th08.cfg ~/.th08/th08.cfg.bak
24 base64 th08.cfg.bak -w 0|sed 's/.\(...\)$/C\1/'|base64 -d>~/.th08/th08.cfg
25 rm ~/.th08/th08.cfg.bak
27 cd ~/.th08
28 if [ -e "$HOME"/.th08/th08e.exe ]; then
29 wine "$HOME"/.th08/th08e.exe "$@"
31 if [ ! -e "$HOME"/.th08/th08e.exe ]; then
32 wine "$HOME"/.th08/th08.exe "$@"
34 if [ "true" == "$myins" ] ; then
35 killall timidity