#! /bin/sh

# checking for the GLOBUS_LOCATION

if test "x$GLOBUS_LOCATION" = "x"; then
    echo "Using default GLOBUS_LOCATION of /usr"
    GLOBUS_LOCATION="/usr"
fi

if [ -f ${GLOBUS_LOCATION}/libexec/globus-bootstrap.sh ]; then
    GLOBUS_BOOTSTRAP="${GLOBUS_LOCATION}/libexec/globus-bootstrap.sh"
elif [ -f ${GLOBUS_LOCATION}/share/globus/globus-bootstrap.sh ]; then
    GLOBUS_BOOTSTRAP="${GLOBUS_LOCATION}/share/globus/globus-bootstrap.sh"
else
    echo "ERROR: Unable to locate globus-bootstrap.sh in \${GLOBUS_LOCATION}/libexec/"
    echo "       or ${GLOBUS_LOCATION}/share/globus/"
    echo "       Please ensure that you have installed the globus-core package and"
    echo "       that GLOBUS_LOCATION is set to the proper directory"
    exit
fi

. ${GLOBUS_BOOTSTRAP}
