#! /bin/sh

# See http://3d-alignment.eu/ 

COMPL=/etc/bash_completion.d/strap_base
if  [ "$_strap_base_defined" = "" ] && [ -f  $COMPL ]; then 
    echo
    echo "Howto enable advanced tabulator word completion at the command line? "
    echo "   Run the following line or add it to the file ~/.bashrc"
    echo "   . /etc/bash_completion"
    echo "   Advantage: Not only file names but also Strap's command line options are expanded with the tab-key."
    echo 
fi

. /usr/lib/java-wrappers/java-wrappers.sh
find_java_runtime java6

# Java option max heap size 



jreArgs=""
CP=/usr/lib/strap-base/strap-protein-alignment-1.jar:
for i in "$@"; do 
    jreArg=${i##JVM_}
    if [ "$i" != "$jreArg" ]; then
        jreArgs="$jreArgs $jreArg "; 
    fi
   
    if [ "$i" != "${i##-cp=}" ]; then CP=${i##-cp=}":"$CP; fi
done
echo
set -x
$JAVA_HOME/bin/java $jreArgs -cp $CP   charite.christo.strap.Strap -useDebian -warnInstall=debian -debianStrapBase "$@"
set +x


