diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2012-09-03 12:32:43 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2012-09-03 12:32:43 +0200 |
commit | 59a0d21007a8a3a37a407d72bda349f86d8943bf (patch) | |
tree | 4c265747b327b6226d90d730c0dfdaaf5aef45dd /play.sh | |
parent | 104bb1b9a0f6518686754b0bfa4c9e11c23b1efb (diff) | |
download | play-59a0d21007a8a3a37a407d72bda349f86d8943bf.tar.gz play-59a0d21007a8a3a37a407d72bda349f86d8943bf.tar.bz2 play-59a0d21007a8a3a37a407d72bda349f86d8943bf.zip |
Some more commenting -- and allowing a default PREFIX
Diffstat (limited to 'play.sh')
-rwxr-xr-x | play.sh | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -87,8 +87,6 @@ load () { EENV[WINEPREFIX]='eval echo $PREFIX' ENV[DISPLAY]=":1" -PREFIX="~/.wine" - # functions play_execute () { exc -e startx $BIN -x $GAME -- $DISPLAY -ac -br -quiet ${=EXARGS} @@ -100,7 +98,13 @@ play_prepare () { } play_setenv () { + # default PREFIX PREFIX=${PREFIX:-$GAME} + + # set environment + # ENV is set directly -- EENV is evaluated + # it is possible to override ENV[p] by PLAY_ENV_p + # (and similar for EENV) for e v in ${(kv)ENV}; do v=${(P)${:-PLAY_ENV_$e}:-$v} exp $e $v @@ -131,7 +135,8 @@ EXPORT play execute prepare setenv run cleanup # }}} if [[ $1 == "-x" ]]; then - load $2 + GAME=$2 + load $GAME prepare run cleanup |