#!/bin/bash

version="6.1.0"
type=$(uname -m)


binpath=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")
prefix=$(dirname $binpath)

bin=simpson_${version}_${type}

if [ -f ${prefix}/bin/$bin ]; then
  export LD_LIBRARY_PATH=$prefix/share/simpson/lib
  export TCL_LIBRARY=$prefix/share/simpson/tcl8.6
  #export CSDM_IN=$prefix/share/simpson/csdm.in

  $prefix/bin/$bin "$@"
  exit $?
else
  echo The binary $bin does not exist
  exit 0
fi
