#!/bin/sh

# $Id: bundle_info 59386 2010-10-14 18:28:47Z merge $

System=Unix

Bundles=""
AllProducts=""

expprod() {
    if test "$#" -lt 3; then
	echo "internal error"
	exit 1
    fi

    alist=""
    notfound=0
    for list in $3; do
	if test -f "$list"; then
	    if test -z "$alist"; then
		alist="lst=$list"
	    else
		alist="$alist lst=$list"
	    fi
	else
	    notfound=1
	fi
    done

    # if any of the list files were not found, this product is not available
    if test "$notfound" -eq 1; then
	return
    fi

    # set the various variables used by the installer
    eval $1=$1_product
    eval $1_product=\"$alist\"
    eval $1_name=\"$2\"
    eval Bundles=\"\$Bundles $1\"
    eval AllProducts=\"\$AllProducts $1_product\"
} # expprod

expprod AcuDevSys "ACUCOBOL-GT Development System" "complist runlist"
expprod Runtime "ACUCOBOL-GT Runtime" "runlist"
expprod AcuServer "AcuServer" "servlist"
expprod AcuConnect "AcuConnect" "connlist"
expprod Acu4GLInformix "Acu4GL for Informix" "inflist runlist"
expprod Acu4GLOracle "Acu4GL for Oracle" "oralist runlist"
expprod Acu4GLSybase "Acu4GL for Sybase" "syblist runlist"
expprod Acu4GLDB2 "Acu4GL for DB2" "db2list runlist"
expprod AcuSQLDevSys "AcuSQL Development System" "rsqllist complist runlist"
expprod AcuSQLPreCompiler "AcuSQL Precompiler" "csqllist rsqllist"
expprod AcuSQLRuntime "AcuSQL Runtime" "rsqllist runlist"
expprod AcuXDBCServer "AcuXDBC Server" "xdbclist xdbtlist"
expprod AcuXDBCEE "AcuXDBC Enterprise Edition" "xdbclist xdbtlist xdbelist"
expprod MFDBX "Micro Focus DBX" "dbxlist"
expprod XBIS "Xcentrisity(R) Business Information Server for extend" "bislist runlist"

Custom=
Bundles="$Bundles Custom"


#
# dump variables if requested
#
if [ "$1" = 'dump' ]; then
    echo "System=$System"
    for prod in $Bundles; do
	if [ $prod != "Custom" ]; then
	    eval name="\$${prod}_name"
	    echo "${prod}_name=$name"
	    eval product="\$${prod}_product"
	    echo "${prod}_product=$product"
	fi
    done
fi
