#!/bin/sh
#
(if [ "x$FGUI" = x ] ; then \
     FGUI=$FTOOLS; \
     export FGUI;
fi; \
FITSVIEWER_LIBRARY=$FGUI/lib/fgui; \
LD_LIBRARY_PATH=$FGUI/lib:$LD_LIBRARY_PATH ;\
if [ "x$DYLD_LIBRARY_PATH" = x ] ; then \
     DYLD_LIBRARY_PATH=$FGUI/lib; \
else \
     DYLD_LIBRARY_PATH=$FGUI/lib:$DYLD_LIBRARY_PATH; \
fi; \
export DYLD_LIBRARY_PATH; \
export FITSVIEWER_LIBRARY; \
export LD_LIBRARY_PATH;\
unset TCL_LIBRARY; unset TK_LIBRARY; unset TCLLIBPATH; \
unset ITCL_LIBRARY; unset ITK_LIBRARY; \
if [ "$#" -ge 2 -a "$2" = "hera" ] ; then \
  XPA_ACL=false; \
  export XPA_ACL; 
  fi; \
$FGUI/bin/wish $FITSVIEWER_LIBRARY/fguiInit.tcl -- "$@")
