diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2010-06-14 23:26:35 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2010-06-14 23:26:35 +0200 |
commit | e474a290b7f5edfa4e6bd4d061b48487b258fc77 (patch) | |
tree | 6009034c2b30fe474a82eab8c5a4c1a9c7c5b998 /play.sh | |
parent | 4bb7847fcea402970380c581428ccd17794e0a26 (diff) | |
download | play-e474a290b7f5edfa4e6bd4d061b48487b258fc77.tar.gz play-e474a290b7f5edfa4e6bd4d061b48487b258fc77.tar.bz2 play-e474a290b7f5edfa4e6bd4d061b48487b258fc77.zip |
Add torchlight; fix argument escaping
Diffstat (limited to 'play.sh')
-rwxr-xr-x | play.sh | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -18,9 +18,9 @@ exc () { sleep 3 if [[ -n $fork ]]; then - exec $@ &! + exec "$@" &! else - eval $@ + eval "$@" fi } @@ -41,8 +41,14 @@ if [[ $1 == "-x" ]]; then exp WINEDEBUG "-all" exp DISPLAY ":1" - exc wine start $gpath $args + # start game + exc wine start $gpath "$args" + + # wait for wine to shutdown exc wineserver -w + + # when the script reaches this point, + # the new X will be terminated else local game=$1 @@ -57,13 +63,14 @@ else gpath="c:/Programme/steam/steam.exe" size="1280x1024" - [[ $# > 0 ]] && args=$@ + [[ $# > 0 ]] && args="-applaunch ${=@}" } typeset -A games games[bg2]='gpath=c:/spiele/bg2/baldur.exe; size=1024x768' games[fallout]='prefix=~/.fallout/; gpath=c:/spiele/fallout/falloutw.exe; size=800x600; x11args="-depth 16"' games[steam]='steam' + games[torchlight]='steam 41600' if [[ -z $games[$game] ]]; then echo "*** Game '$game' not found" @@ -76,5 +83,5 @@ else eval $games[$game] fi - exc -f startx $0 -x $prefix $gpath $size "$args" -- :1 -ac -br -quiet ${=x11args} + exc -f startx $0 -x $prefix $gpath $size $args -- :1 -ac -br -quiet ${=x11args} fi |