if (! $?GLOBUS_CONFIG) then
  set GLOBUS_CONFIG=/etc/globus.conf
endif

# Parse the configuration file
if ( -r "$GLOBUS_CONFIG" ) then
  set tmp=`grep ^GLOBUS_LOCATION $GLOBUS_CONFIG| tail -1|sed 's/=/ /'`
  if ( ! -z "$GLOBUS_CONFIG" ) then
    eval setenv $tmp
  endif
endif

if (! $?GLOBUS_LOCATION ) then
  setenv GLOBUS_LOCATION /opt/globus
endif

if ( -r "$GLOBUS_LOCATION/etc/globus-user-env.csh" ) then
  source $GLOBUS_LOCATION/etc/globus-user-env.csh
endif

if (! $?GLOBUS_LOCATION ) then
  setenv GLOBUS_LOCATION /opt/globus
endif

if ( $?GLOBUS_TCP_PORT_RANGE ) then
  setenv GLOBUS_TCP_PORT_RANGE $GLOBUS_TCP_PORT_RANGE
endif

if ( $?GLOBUS_UDP_PORT_RANGE ) then
  setenv GLOBUS_UDP_PORT_RANGE $GLOBUS_UDP_PORT_RANGE
endif
