#!/bin/sh

CURR_DIR=`pwd`

CTASD=`test -h $0 && readlink $0 2> /dev/null`

if [ "$CTASD" = "" ] 
then
	CTASD=$0;
fi

CTASD_PATH=`dirname $CTASD`

echo running ctasd from $CTASD_PATH

# this is required in order for ctasd to find its loader.
cd $CTASD_PATH
CMD="./ctasd.bin -l $CURR_DIR $@"

# tell the loader where his libs are
LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH $CMD
