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

  1. :
  2.  
  3. #
  4. # $Header: c.in.pp,v 6.33 89/09/27 15:49:07 rafsarif Exp $ c.in.pp
  5. #
  6.  
  7. #
  8. #  c.install
  9. #
  10. #  This is the installation script to install Pro*C on a
  11. #  UNIX ORACLE system.
  12. #
  13. #  It can be invoked by the master installation script, oracle.install,
  14. #  or as a stand alone procedure.
  15. #
  16. #  The master script, oracle.install, sets ORACLE_HOME, 
  17. #  and LOG before it runs this script.
  18. #  If the script is run stand-alone, then these variables must be set and
  19. #  exported before it is run.
  20. #
  21. #  Default answers are shown in square brackets.
  22. #
  23.  
  24. NETLIBNAME="nsl_s"
  25. PHYS_BLK_SIZE=2048  
  26. VNDR_NETLIBS="-lnsl_s "
  27. CHOWN=/bin/chown
  28. MAKE=make        
  29. ORACLE_LPPROG="/usr/bin/lp"
  30. ORACLE_PAGER="/usr/bin/more"
  31. ORACLE_LPSTAT="/usr/bin/lpstat"
  32.  
  33. #
  34. #  Initialize variables used in installation script.
  35. #
  36. PRODUCT=C
  37. product=c
  38. MKTG_NAME=Pro*C
  39.  
  40. #
  41. #  Setup  the environment variables for the installation script.
  42. #
  43. . $ORACLE_HOME/install/setup.ins
  44.  
  45. #
  46. # "install" user utilities
  47. #
  48. cd $ORACLE_HOME/bin
  49. chmod 751 pcc 2>/dev/null
  50.  
  51. #FILE_LIST=`cat ${ORACLE_HOME}/${product}/install/${PRODUCT}.DIST`
  52.  
  53. #
  54. #  Move/copy/link any files which are installed in a directory different 
  55. #  from the one that they are distributed in.
  56. #
  57. echo ""
  58. echo "Installing $MKTG_NAME files..." | tee -a $LOG
  59. echo ""
  60.  
  61. rm -f $ORACLE_HOME/${product}/lib/ORACA.H 2> /dev/null
  62. rm -f $ORACLE_HOME/${product}/lib/SQLCA.H 2> /dev/null
  63. rm -f $ORACLE_HOME/${product}/lib/SQLDA.H 2> /dev/null
  64. rm -f $ORACLE_HOME/${product}/demo/proc.mk 2> /dev/null
  65. ln $ORACLE_HOME/$product/lib/oraca.h $ORACLE_HOME/$product/lib/ORACA.H 2> /dev/null
  66. ln $ORACLE_HOME/$product/lib/sqlca.h $ORACLE_HOME/$product/lib/SQLCA.H 2> /dev/null
  67. ln $ORACLE_HOME/$product/lib/sqlda.h $ORACLE_HOME/$product/lib/SQLDA.H 2> /dev/null
  68. ln $ORACLE_HOME/$product/lib/proc.mk $ORACLE_HOME/$product/demo/proc.mk 2> /dev/null
  69.  
  70. #
  71. # Remove the dummy entry in libpro.a and replace the real libc.a instead
  72. #
  73. echo ""
  74. echo "Adding $MKTG_NAME library to $ORACLE_HOME/rdbms/lib/libpro.a..." | tee -a   $LOG
  75. echo ""
  76. ar d $ORACLE_HOME/rdbms/lib/libpro.a pc2dum.o > /dev/null 2>&1
  77. $ORACLE_HOME/install/mergelib -d$ORACLE_HOME/rdbms/lib -olibpro.a $ORACLE_HOME/${product}/lib/lib${product}.a >> $LOG 2>&1      
  78.  
  79. #
  80. # Link pcc (in the lib directory) and put it into the bin directory.
  81. #
  82. if [ "$LINK_PRODUCT" = "T" ] ; then
  83.   cd $ORACLE_HOME/${product}/lib
  84.   echo ""
  85.   echo "Linking and installing $MKTG_NAME executables..." | tee -a $LOG
  86.   echo ""
  87.   $MAKE -f proc.mk  ORACLE_HOME=$ORACLE_HOME install >> $LOG 2>&1
  88.    if [ $? = 0 ] ; then
  89.       case $SUPER_USER in
  90.          TRUE)       $CHOWN $ORACLE_OWNER $ORACLE_HOME/bin/pcc ;;
  91.       esac
  92.    else
  93.       echo "
  94.     Relinking Error.
  95.     The executable for $MKTG_NAME was not made successfully.
  96.     Please check the log file, and repeat the installation
  97.     procedure for $MKTG_NAME.
  98.     " | tee -a $LOG
  99.    fi
  100. fi
  101.  
  102. #
  103. #  Use "touch" to time stamp hidden file, for future verification of
  104. #  product installation.
  105. touch "$ORACLE_HOME/$product/install/.$product" 2> /dev/null
  106.  
  107. #
  108. #  Hook for verification scripts -- this must happen last
  109. #
  110. case $ORACLE_VERIFY in
  111.     T)  if [ -f $ORACLE_HOME/$product/install/${product}.verify ] ; then
  112.             ORACLE_INSTALL=T ; export ORACLE_INSTALL
  113.             chmod 755 $ORACLE_HOME/$product/install/${product}.verify
  114.             $ORACLE_HOME/$product/install/${product}.verify
  115.         fi ;;
  116. esac
  117.  
  118. #
  119. #  Do any cleanup and exit this script.
  120. #
  121. echo ""
  122. case $UPDATE in
  123.     Y) echo "$MKTG_NAME update completed." | tee -a $LOG ;;
  124.     *) echo "$MKTG_NAME installation completed." | tee -a $LOG ;;
  125. esac
  126. echo ""
  127. sync;sync;sync
  128. exit 0
  129.