#!/bin/sh

if [ -z "$BEAST" ]; then
	## resolve links - $0 may be a link to application
	PRG="$0"

	# need this for relative symlinks
	while [ -h "$PRG" ] ; do
	    ls=`ls -ld "$PRG"`
	    link=`expr "$ls" : '.*-> \(.*\)$'`
	    if expr "$link" : '/.*' > /dev/null; then
		PRG="$link"
	    else
		PRG="`dirname "$PRG"`/$link"
	    fi
	done

	# make it fully qualified
	saveddir=`pwd`
	BEAST0=`dirname "$PRG"`/..
	BEAST=`cd "$BEAST0" && pwd`
	cd "$saveddir"
fi

BEAST_LIB="/opt/conda/conda-bld/beast2_1616700197481/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/share/beast2-2.4.5-3/lib"

if [ -z "$JAVA_HOME" ]; then
  JAVA=java
else
  JAVA=$JAVA_HOME/bin/java
fi
$JAVA -Xms256m -Xmx4g -Djava.library.path="$BEAST_LIB" -cp "$BEAST_LIB/launcher.jar" beast.app.tools.LogCombinerLauncher $*

