#!/bin/sh
# Launch Excalibur: Morgana's Revenge.

# Copyright (C) 2006 Glen Ditchfield
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# At the time of writing, the GNU General Public License version 2 was 
# available at <http://www.gnu.org/licenses/gpl.html>.  If it is no longer
# available, you may obtain a copy by writing to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

for emr_option
do
  case $emr_option in
  -h | --help)
    emr_help=yes ;;
  -V | --version)
    emr_version=yes ;;
  esac
done

if test "$emr_help" = "yes"
then cat <<EOF
Usage: $0 [OPTION]...
Run the Aleph One game engine with the Excalibur: Morgana's Revenge scenario.

  -h, --help     display this help and exit
  -V, --version  display version information and exit

Other options are passed to Aleph One.  See \`alephone --help' for details.
You can use the ALEPHONE_DATA environment variable to specify the scenario's
data directory.
EOF
  exit 0
fi

if test "$emr_version" = "yes"
then echo Excalibur: Morgana\'s Revenge 3.0
     exit 0
fi

# Default locations of EMR and Aleph One data files.
test -z "$ALEPHONE_DATA" && ALEPHONE_DATA='/usr/share/emr'
export ALEPHONE_DATA

exec /usr/bin/alephone "$@"
