UT2004 + Alienswarm : Fixed run script

Need help with one of the installers?
Post Reply
zblach

UT2004 + Alienswarm : Fixed run script

Post by zblach » Mon Oct 31, 2005 3:18

Hi, fixed it and matched it with your existing formats. My gift in return to you for all the hard work you've done keeping me from mine.

Code: Select all

#!/bin/sh
###############################################################################
#
## LIFLG Startup Script (UT2004 + Alienswarm)
#
###############################################################################
#
# The game binary
GAME_BINARY="ut2004"

# Subdirectory
SUBDIR="."

# Additional commandline options for mods etc.
CMD_ARGS="-mod=AlienSwarm"

# don't use US keyboard layout
NOUSLAYOUT="true"


###############################################################################
## DO NOT EDIT BELOW THIS LINE
###############################################################################
readlink() {
    local path=$1 ll
   
    if [ -L "$path" ]; then
        ll="$(LC_ALL=C ls -l "$path" 2> /dev/null)" &&
   echo "${ll/* -> }"
    else
   return 1
    fi
}

LANG=POSIX
export LANG
script=$0
count=0
while [ -L "$script" ] 
do
    script=$(readlink "$script")
    count=`expr $count + 1`
    if [ $count -gt 100 ] 
    then
        echo "Too many symbolic links"
        exit 1
    fi
done
GAME_DIR=`dirname $script`

trap "setxkbmap" EXIT

# games run better with US keyboard layout
test $NOUSLAYOUT || setxkbmap -symbols 'us(pc101)'

cd $GAME_DIR
cd $SUBDIR

# start the game
./$GAME_BINARY "$CMD_ARGS" "$@"
EXITCODE="$?"

# reset kb layout
setxkbmap

exit $EXITCODE

kratz00
liflg member
Posts: 1654
Joined: Fri Oct 22, 2004 16:23

Post by kratz00 » Mon Oct 31, 2005 17:05

what was wrong with the old one, except the "US keyboard handling"?
which was fixed long ago

Post Reply