#!/bin/sh

# Lets find out where everything is located and
# make some general assumptions if directories are not found
#

# Alias Location

if test ! "$ALIAS_LOCATION"
then
  alias_loc="/usr/aw/alias"
else
  alias_loc="$ALIAS_LOCATION"
fi

export alias_loc

if [ ! -d $alias_loc ]
then
  echo "no Alias directory found"
fi

# Games location
 
if test ! "$GAMES_LOCATION"
then
  games_loc="$alias_loc/ODS/Games"
else
  games_loc="$GAMES_LOCATION"
fi

export games_loc

if [ ! -d $games_loc ]
then
  echo "Games directory not found: $games_loc"
  exit 1
fi

if test ! "$GAMES_DATA_DIR"
then
  rtg_data="/usr/tmp"
else
  rtg_data="$GAMES_DATA_DIR"
fi

export rtg_data


# Where the executables are

rtg_bin="$games_loc/bin"
export rtg_bin

xterm -geometry 80x24 -T "Wire to RTG Output v1.8" -fg green -bg black -font '-*-iris-medium-*-*-*-12-*-*-*-*-*-*-*' -e $rtg_bin/rtg_drv $*

