#!/bin/sh

#Script adapted for interfacing with Casper, Gavin Lowe, 2000

if [ "xbatch" != "x$1" -a "x" = "x$DISPLAY" ]; then
  echo "FDR requires DISPLAY to be set unless running in batch mode."
  exit 1
fi
if [ "x$FDRHOME" = "x" ]; then
  echo "FDRHOME must be set to the directory containing the FDR installation."
  exit 1
fi

# Next two lines fix work round problems with tr under AIX 3.2.5
LANG=C
export LANG

# Eliminate conflict with later Tcl installations
unset TCL_LIBRARY
unset TK_LIBRARY
unset TIX_LIBRARY

WHERE=${FDRBIN:=$FDRHOME/bin}

if [ "xbatch" != "x$1" ]; then
  $WHERE/fdr2tix $FDRHOME/lib/fdr/f2.tcl $*
else
  shift
  $WHERE/fdr2tix -insecure -nowindow ${CASPERBASE}/CasperFDR/FDR/fdrBatchC.tcl $*
fi
