#! /bin/bash
#
# Copyright (c) 2002-2003 Northwestern University
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
#
# 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

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

# 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="/tmp/__gisl.tmp"

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

 # check if a grid-info-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

