home *** CD-ROM | disk | FTP | other *** search
- :
- #
- # $Header: c.ver.pp,v 6.9 89/03/10 18:29:47 rafsarif Exp $ c.ver.pp
- #
- #
- # c.verify
- #
- # This script does 3 things to verify the Pro*C product:
- # - install Pro*C if $ORACLE_INSTALL!=T
- # i.e. NOT being called inside c.install
- # - display banners for pcc
- # - invoke demo:
- # * samplec
- # (This is just a VERY short test to verify that
- # Pro*C is functional. It is not trying
- # to demonstrate the product nor to qa it.)
- #
- # The script is assumed itself to be in ?/c/install
- # All output of this automated process will be recorded in
- # ?/c/install/c_ver.out
- #
-
- NETLIBNAME="nsl_s"
- PHYS_BLK_SIZE=2048
- VNDR_NETLIBS="-lnsl_s "
- CHOWN=/bin/chown
- MAKE=make
- ORACLE_LPPROG="/usr/bin/lp"
- ORACLE_PAGER="/usr/bin/more"
- ORACLE_LPSTAT="/usr/bin/lpstat"
-
- PRODUCT=C
- product=c
- MKTG_NAME=Pro*C
-
- #
- # Setup the environment variables for the verification script.
- #
- . $ORACLE_HOME/install/setup.ver
-
- #
- ## 1. Automatically install Pro*C if ! $ORACLE_INSTALL.
- # i.e. not called by c.install
- #
- echo $N ".$C" #Wait message
- if test "$ORACLE_INSTALL" != T
- then
-
- echo "#Default install of Pro*C:
- " >> $OUTPUT
- # Since we are calling c.install within verify,
- # ORACLE_VERIFY should be false.
- ORACLE_VERIFY=F
- export ORACLE_VERIFY
- # exit if install fails
- c.install >> $OUTPUT 2>&1 <<!
- !
- if test $? -gt 0
- then exit
- fi
- echo "
-
- " >> $OUTPUT
- echo " #########################################
- " >> $OUTPUT
-
- fi
- #
- ## 2. Check banners for pcc
- # * uses $ORACLE_HOME/install/prtversion.sh
- #
- echo $N ".$C" #Wait message
- echo "#Check the banners:
- " >> $OUTPUT
- $ORACLE_HOME/install/prtversion.sh -f temp$$
- echo $N ".$C" #Wait message
- fgrep 'pcc' temp$$ >> $OUTPUT
- rm temp$$
- echo "
-
- " >> $OUTPUT
-
- echo " ########################################
- " >> $OUTPUT
- #
- ## 3. Invoke the demos
- #
- echo $N ".$C" #Wait message
- echo "#Demo testing:
- " >> $OUTPUT
- # invoke the demos
- cd ../demo
- rm -f samplec samplec.c
- sqldba >/dev/null <<!
- connect $SYSTEM_PASS
- grant connect,resource to scott identified by tiger;
- connect scott/tiger
- @$ORACLE_HOME/sqlplus/demo/demobld
- exit
- !
-
- echo " #make executable samplec from samplec.pc and invoke it
- # make -f proc.mk samplec
- " >> $OUTPUT
- $MAKE -f proc.mk ORACLE_HOME=$ORACLE_HOME samplec >> $OUTPUT 2>&1
- echo "
- ---input-to-samplec---
- KIRK
- captain
- 1234.00
- 10
-
- ---end-of-input---
-
- " >> $OUTPUT
- samplec >> $OUTPUT <<!
- KIRK
- captain
- 1234.00
- 10
-
- !
-
- echo "
-
- " >> $OUTPUT
-
- echo " ####### C.Verify Done #######
- " >> $OUTPUT
-
- echo ""
- echo " ####### C.Verify Done #######"
-
-