case $OPT in

p) INSTPATH=$OPTARG mkdir -p $INSTPATH ;;

r) REGVAR=Y ;;

?) echo "invalid command line option $*" syntax

exit 1 ;;

esac done

;;

esac

#verify the ODBC driver files and application files are ready

#and then start the deployment

TESTPATH=`echo $0egrep '^/'` if [ -z $TESTPATH ]; then

dirname `pwd`/$0read CURPATH else

CURPATH=`dirname $0`

fi

cd $CURPATH

if [ ! -d $DIR_DRV ] [ ! -d $DIR_APP ]; then

echo " ODBC CLI driver or Application directory not existing.\n Abort." exit 1

fi

#deploy applications and ODBC CLI driver to specified path cd $INSTPATH

cp -R "$CURPATH/$DIR_APP" .

mkdir -p "$DIR_DRV" cd $DIR_DRV

for file in "$CURPATH/$DIR_DRV/*.tar.gz" do

gunzip -c $filetar -xf - done

# register system variable

ODBCLIBPATH=`find $INSTPATH/$DIR_DRV -type d -name lib`

case $REGVAR in

Y)echo "

#The following lines have been added by app_install script export LIBPATH=$LIBPATH:$ODBCLIBPATH

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ODBCLIBPATH " >> ~/.profile

if [ `uname` == "AIX" ]; then echo " export

DB2_CLI_DRIVER_INSTALL_PATH=$DB2_CLI_DRIVER_INSTALL_PATH:$ODBCLIBPATH" >> ~/.profile fi

166DB2 Deployment Guide

Page 180
Image 180
IBM manual 166 DB2 Deployment Guide