#!/bin/sh # This is a wrapper script to launch the real ufoai binary, suitable # for a site-wide install on a UNIX-like OS. # # It assumes the game was installed in $INSTDIR, and # $INSTDIR/base/save/ does not exist (reasonable assumption for a # site-wide install). # # It creates a ~/.ufoai/ dir, suitable as a current-directory # to launch the game in, such that ufo can write player's data. # The user is allowed to some extent to replace the symlinks to system # data with copies, maybe modified. # Known limitations: # - the script does not detect if the user has replaced the symlinks # with invalid ones. # Copyright (c) 2004 Yann Dirson # Available under the terms of the GNU General Public Licence, version 2. set -e INSTDIR=/usr/lib/games/ufoai cd $INSTDIR if [ $# != 0 -o -r ~/.ufoai/base/config.cfg ] then ${INSTDIR}/ufo "$@" else ${INSTDIR}/ufo +set vid_ref glx +set gl_driver /usr/lib/libGL.so.1 fi