#!/bin/bash


# Simple shell stub to resolve Globus run-time libraries

if test "x$GLOBUS_LOCATION" = "x"; then
  if test -f /etc/sysconfig/globus ; then
      . /etc/sysconfig/globus
  fi
fi

if test "x$GLOBUS_LOCATION" = "x"; then
  GLOBUS_LOCATION=/opt/globus
fi

if test -d "$GLOBUS_LOCATION/lib"; then
  if test "x$LD_LIBRARY_PATH" = "x"; then
    LD_LIBRARY_PATH=$GLOBUS_LOCATION/lib
  else
    LD_LIBRARY_PATH=$GLOBUS_LOCATION/lib:$LD_LIBRARY_PATH
  fi
  export LD_LIBRARY_PATH
fi

dir=`dirname $0`
dir=`cd $dir ; pwd`

# Fool the binary
exec -a $0 $dir/ngsub.exe $*
