home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a524 / 42.ddi / install / c.verify < prev   
Encoding:
Text File  |  1991-03-04  |  2.6 KB  |  134 lines

  1. :
  2. # $Header: c.ver.pp,v 6.9 89/03/10 18:29:47 rafsarif Exp $ c.ver.pp 
  3. #
  4. # c.verify
  5. #
  6. # This script does 3 things to verify the Pro*C product:
  7. #    - install Pro*C if $ORACLE_INSTALL!=T
  8. #          i.e. NOT being called inside c.install
  9. #    - display banners for pcc
  10. #    - invoke demo: 
  11. #        * samplec
  12. #          (This is just a VERY short test to verify that
  13. #           Pro*C is functional.  It is not trying
  14. #           to demonstrate the product nor to qa it.)
  15. # The script is assumed itself to be in ?/c/install
  16. # All output of this automated process will be recorded in 
  17. # ?/c/install/c_ver.out
  18.  
  19. NETLIBNAME="nsl_s"
  20. PHYS_BLK_SIZE=2048  
  21. VNDR_NETLIBS="-lnsl_s "
  22. CHOWN=/bin/chown
  23. MAKE=make        
  24. ORACLE_LPPROG="/usr/bin/lp"
  25. ORACLE_PAGER="/usr/bin/more"
  26. ORACLE_LPSTAT="/usr/bin/lpstat"
  27.  
  28. PRODUCT=C
  29. product=c
  30. MKTG_NAME=Pro*C
  31.  
  32. #
  33. #  Setup  the environment variables for the verification script.
  34. #
  35. . $ORACLE_HOME/install/setup.ver
  36.  
  37. #
  38. ## 1. Automatically install Pro*C if ! $ORACLE_INSTALL.
  39. #             i.e. not called by c.install
  40. #
  41. echo $N ".$C"                   #Wait message
  42. if test "$ORACLE_INSTALL" != T
  43. then
  44.  
  45. echo "#Default install of Pro*C:
  46. " >> $OUTPUT
  47. # Since we are calling c.install within verify, 
  48. #   ORACLE_VERIFY should be false.
  49. ORACLE_VERIFY=F
  50. export ORACLE_VERIFY
  51. # exit if install fails
  52. c.install >> $OUTPUT 2>&1 <<!
  53. !
  54. if test $? -gt 0
  55. then exit
  56. fi
  57. echo "
  58.  
  59. " >> $OUTPUT
  60. echo "               #########################################
  61. " >> $OUTPUT
  62.  
  63. fi
  64. #
  65. ## 2. Check banners for pcc
  66. #        * uses $ORACLE_HOME/install/prtversion.sh
  67. #
  68. echo $N ".$C"                   #Wait message
  69. echo "#Check the banners:
  70. " >> $OUTPUT
  71. $ORACLE_HOME/install/prtversion.sh -f temp$$
  72. echo $N ".$C"                   #Wait message
  73. fgrep 'pcc' temp$$ >> $OUTPUT
  74. rm temp$$
  75. echo "
  76.  
  77. " >> $OUTPUT
  78.  
  79. echo "               ########################################
  80. " >> $OUTPUT
  81. #
  82. ## 3. Invoke the demos
  83. #
  84. echo $N ".$C"                   #Wait message
  85. echo "#Demo testing:
  86. " >> $OUTPUT
  87. # invoke the demos
  88. cd ../demo
  89. rm -f samplec samplec.c
  90. sqldba >/dev/null <<!
  91. connect $SYSTEM_PASS
  92. grant connect,resource to scott identified by tiger;
  93. connect scott/tiger
  94. @$ORACLE_HOME/sqlplus/demo/demobld
  95. exit
  96. !
  97.  
  98. echo "      #make executable samplec from samplec.pc and invoke it
  99.       #      make -f proc.mk samplec
  100. " >> $OUTPUT
  101. $MAKE -f proc.mk ORACLE_HOME=$ORACLE_HOME samplec >> $OUTPUT 2>&1
  102. echo "
  103. ---input-to-samplec---
  104. KIRK
  105. captain
  106. 1234.00
  107. 10
  108.  
  109. ---end-of-input---
  110.  
  111. " >> $OUTPUT
  112. samplec >> $OUTPUT <<!
  113. KIRK
  114. captain
  115. 1234.00
  116. 10
  117.  
  118. !
  119.  
  120. echo "
  121.  
  122. " >> $OUTPUT
  123.  
  124. echo "               #######    C.Verify Done    #######
  125. " >> $OUTPUT
  126.  
  127. echo ""
  128. echo "               #######    C.Verify Done    #######"
  129.  
  130.