#! /bin/bash 

# Compatibility note:
# Tested successfully on GNU/Linux, [Solaris, AIX, and IRIX64]
#
# NOTE: If your grid-info-soft.conf file is not located at:
# $GLOBUS_LOCATION/etc/grid-info-soft.conf, please specify
# the full path to the conf file in the environment variable
# GRID_INFO_SOFT

# default libexecdir used to bootstrap scripts
libexecdir=${GLOBUS_LOCATION}/libexec

#echo $libexecdir

# load GRIS common code and initialization
. ${libexecdir}/grid-hostinfo-soft-common

#echo $libexecdir

# load the sh tools
. ${libexecdir}/globus-sh-tools.sh

#########################################################################

probe_available_software ()
{
# this script needs one temporary file
# If this default is not good enough, please specify one here
    _tmp_file="$GLOBUS_LOCATION/var/grid-info-soft-posix.tmp"

    _grid_info_soft="$GLOBUS_LOCATION/etc/grid-hostinfo-soft.conf"

 # check if a grid-hostinfo-soft.conf was specified by environment var
    if [ ! -z "$GRID_INFO_SOFT" ]; then
        _grid_info_soft="$GRID_INFO_SOFT"
    fi

    # run this in initialized subshell environment
    emit_soft_info_descriptions
}

#############
# do the work
probe_available_software
