#!/bin/sh # ProInventory execution script # Capture $DIR, as all ProInventory files should be contained in the one place. # This needs to be put into the PATH and shared library path DIR=`dirname $0` # Look for -nopro on command line, as we skip some checking # if user issues -nopro for parm in $@ do if [ ${parm} = -nopro ] then NOPRO=1 export NOPRO fi done if [ ${NOPRO-}x = x ] then # Check that DLC is set if [ ${DLC}x = x ] then echo "Environment variable DLC has not been set." echo "You must have Progress installed to run this utility." echo "Please set DLC to your Progress installation directory." exit fi # Check that directory $DLC exists if [ ! -d "$DLC" ] then echo "DLC directory $DLC does not exist." echo "You must have Progress installed to run this utility." echo "Please set DLC to your Progress installation directory." exit fi fi # Set the proinv executable name, by default _proinventory PROINV_EXE=${PROINV_EXE-_proinventory};export PROINV_EXE # In case TERM is not set to something, avoid a warning message. TERM=${TERM-ansi}; export TERM if [ ${NOPRO-}x = x ] then # set the java environment if [ -f $DLC/bin/java_env ] then . $DLC/bin/java_env fi # set the Progress shared lib environment if [ -f $DLC/bin/slib_env ] then . $DLC/bin/slib_env fi # if the Oracle shared lib environment file exists, run it if [ -f $DLC/bin/slibor_env ] then . $DLC/bin/slibor_env fi # if the ODBC shared lib environment file exists, run it if [ -f $DLC/bin/slibod_env ] then . $DLC/bin/slibod_env fi # set the Fathom environment if available if [ -f $FATHOMTARG/bin/fathom_env ] then . $FATHOMTARG/bin/fathom_env elif [ -f $DLC/bin/fathom_env ] then . $DLC/bin/fathom_env fi # if the Replication environment file exists, run it if [ -f $REPLTARG/bin/repl_env ] then . $REPLTARG/bin/repl_env elif [ -f $DLC/bin/repl_env ] then . $DLC/bin/repl_env fi # if the Web Services Toolkit environment file exists, run it if [ -f $WSTKTARG/bin/wstk_env ] then . $WSTKTARG/bin/wstk_env elif [ -f $DLC/bin/wstk_env ] then . $DLC/bin/wstk_env fi fi # if [ ${NOPRO-}x = x ] # proinventory.so will be in the same dir as _proinventory # Add this dir to the shared library path - system specific OSNAME=`uname` case "$OSNAME" in "SunOS") # Sun Solaris v2.5.1/v2.6 LD_LIBRARY_PATH=$DIR:$LD_LIBRARY_PATH export LD_LIBRARY_PATH ;; "HP-UX") # HP UNIX, v11.00, v10.20 SHLIB_PATH=$DIR:$SHLIB_PATH export SHLIB_PATH ;; "AIX") # IBM UNIX v4.2 LIBPATH=$DIR:$LIBPATH export LIBPATH PROLIBPATH=$LIBPATH; export PROLIBPATH ;; "OSF1") # Digital UNIX LD_LIBRARY_PATH=$DIR:$LD_LIBRARY_PATH export LD_LIBRARY_PATH ;; "UnixWare") # Unixware 7 LD_LIBRARY_PATH=$DIR:$LD_LIBRARY_PATH export LD_LIBRARY_PATH ;; "OpenUNIX") # Unixware 8 LD_LIBRARY_PATH=$DIR:$LD_LIBRARY_PATH export LD_LIBRARY_PATH ;; "SCO_SV") # SCO Open Server 5 (Unixware 7 cert platform) LD_LIBRARY_PATH=$DIR:$LD_LIBRARY_PATH export LD_LIBRARY_PATH ;; "Linux") LD_LIBRARY_PATH=$DIR:$LD_LIBRARY_PATH export LD_LIBRARY_PATH PROLIBPATH=$LD_LIBRARY_PATH; export PROLIBPATH ;; *) # Unrecognized uname echo "WARNING: not setting shared library include path for $OSNAME" ;; esac # Make sure DIR is at the top of the path, so we can find $DIR/_proinventory PATH=$DIR:$PATH;export PATH # Execute proinventory exec $PROINV_EXE "$@"