X-Git-Url: http://git.tpope.net/?p=tpope-extra.git;a=blobdiff_plain;f=bin%2Fgamelaunch;h=a3f03a7627337c66823c0d9e21023c12dcd3e9b9;hp=aaa0c515b81cad48ee7a6ca80a8c83896dd355e3;hb=bc83d0e12d5f3a428a34c90b6acbbd072c7606c5;hpb=6d3296dbcaf824fed68a80348847949270b1770b diff --git a/bin/gamelaunch b/bin/gamelaunch index aaa0c51..a3f03a7 100755 --- a/bin/gamelaunch +++ b/bin/gamelaunch @@ -1,7 +1,8 @@ #!/bin/sh -# Author: Tim Pope +# $Id$ +# -*- sh -*- vim: ft=sh sw=4 sts=4 -# Launches a game. Works both on $1 (an argument) and $0 (the actually name +# Launches a game. Works both on $1 (an argument) and $0 (the actual name # of the script, presumably a symlink). Takes care of killing troublemaking # games, pausing unclutter, remapping the keyboard, and setting an away # message. @@ -28,8 +29,10 @@ xmodmap -e "keysym Hyper_L = F14" xmodmap -e "keysym Super_R = F15" for suffix in '_demo' '-demo' 'demo' ''; do + [ -x "/usr/games/`basename $0`$suffix" ] && \ + binary="/usr/games/`basename $0`$suffix" [ -x "/usr/local/bin/`basename $0`$suffix" ] && \ - binary=/usr/local/bin/`basename $0`$suffix + binary="/usr/local/bin/`basename $0`$suffix" done if [ "`basename $0`" = gamelaunch ]; then