#!/bin/sh

# Special code for text editors used by bioLegato and scripts called by bioLegato
# Nedit crashes in some Linux systems due to libraries set in BIRCHLIBS.
# nedit_wrapper unsets LD_LIBRARY_PATH before calling nedit.
# gedit opens all files in a single window. gedit_wrapper.sh forces
# gedit to open each file in different window.
# choose_edit_wrapper.sh returns the name of the wrapper to use
# for each editor, or just returns GDE_TEXTEDIT if there is no
# wrapper.
GDE_TEXTEDIT=`choose_edit_wrapper.sh`
export GDE_TEXTEDIT   

BIOLEGATO_HOME=$BIRCH/java/bioLegato

#We'll hard code BLDNA_HELP_DIR for now. When this script
# gets into BIRCH, the line below can be deleted.
#BLDNA_HELP_DIR=$birch/local/dat/birch

GDE_MAKEMENUS_DIR=$birch/dat/birch
#GDE_MAKEMENUS_DIR=$BLDNA_HELP_DIR
export GDE_MAKEMENUS_DIR
GDE_HELP_DIR=""
export GDE_HELP_DIR

java -Xms6M -Xmx64M -jar $BIOLEGATO_HOME/biolegato.jar $*
#java -Xms6M -Xmx96M -jar $BIOLEGATO_HOME/biolegato.jar $*
#java -Xms6M -Xmx128M -jar $BIOLEGATO_HOME/biolegato.jar $*
#java -Xms6M -Xmx256M -jar $BIOLEGATO_HOME/biolegato.jar $*
#java -Xms6M -Xmx384M -jar $BIOLEGATO_HOME/biolegato.jar $*
#java -jar $BIOLEGATO_HOME/biolegato.jar $*

# ------------------------ LOGGING ------------------------------
# Check to see if we can log when GDE is launched.
# If BIRCH is mounted read only, we don't crash the script

if [ "$BIRCH_LOGGING" -eq "1" ] 
    then
    echo `whoami` `date` >> $BIRCH/local/admin/biolegato.log
fi
