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

  1. :
  2. #
  3. # $Header: otm.in.pp,v 6.10 90/04/18 11:55:16 atam Exp $ otm.in.pp
  4. #
  5. #
  6. #  otm.install
  7. #
  8. #  This is the installation script to install Oracle*Terminal on a
  9. #  UNIX ORACLE system.
  10. #
  11. #  It can be invoked by the master installation script, oracle.install,
  12. #  or as a stand alone procedure.
  13. #
  14. #  The master script, oracle.install, sets ORACLE_HOME and
  15. #  ORACLE_SID before it runs this script.
  16. #  If the script is run stand-alone, then these variables must be set and
  17. #  exported before it is run.
  18. #
  19. #  Default answers are shown in square brackets.
  20. #
  21.  
  22. NETLIBNAME="nsl_s"
  23. PHYS_BLK_SIZE=2048  
  24. VNDR_NETLIBS="-lnsl_s "
  25. CHOWN=/bin/chown
  26. MAKE=make        
  27. ORACLE_LPPROG="/usr/bin/lp"
  28. ORACLE_PAGER="/usr/bin/more"
  29. ORACLE_LPSTAT="/usr/bin/lpstat"
  30.  
  31. #
  32. #  Initialize variables used in installation script.
  33. #
  34. PRODUCT=ORATERM
  35. product=oraterm
  36. MKTG_NAME=Oracle*Terminal
  37.  
  38. #
  39. #  Setup  the environment variables for the installation script.
  40. #
  41. . $ORACLE_HOME/install/setup.ins
  42.  
  43. #
  44. # Check to make sure that Oracle Tool Kit has been installed
  45. #
  46. if [ ! -f $ORACLE_HOME/orakit/install/.orakit ] ; then
  47.     echo "
  48.     Error installing $MKTG_NAME. Please install Ora*Kit
  49.     and repeat $MKTG_NAME installation. 
  50.     " | tee -a $LOG
  51.     exit 1
  52. fi
  53.  
  54. #
  55. # Set correct protections for resource files
  56. #
  57. chmod 644 $ORACLE_HOME/${product}/admin/resource/*.r >> $LOG 2>&1
  58.  
  59. #
  60. # Link oraterm (in the lib directory) and put it into the bin directory.
  61. #
  62. cd $ORACLE_HOME/${product}/lib
  63. if [ "$LINK_PRODUCT" = "T" ] ; then
  64.    echo ""
  65.    echo "Linking and installing $MKTG_NAME executables..." | tee -a $LOG
  66.    echo ""
  67.    $MAKE -f oraterm.mk  ORACLE_HOME=$ORACLE_HOME install >> $LOG 2>&1
  68.    if [ $? != 0 ] ; then
  69.       echo "
  70.         Relinking Error.
  71.         The executables for $MKTG_NAME were not made successfully.
  72.         Please check the log file, and repeat the installation
  73.         procedure for $MKTG_NAME.
  74.         " | tee -a $LOG
  75.    fi
  76. case $SUPER_USER in
  77.     TRUE)    cd $ORACLE_HOME/bin
  78.         $CHOWN $ORACLE_OWNER oraterm;;
  79. esac
  80. fi
  81.  
  82. # Go back to oraterm directory
  83. cd $ORACLE_HOME/${product}
  84.  
  85. #
  86. # Need to set environment variable ORAKITPATH for Oracle*Terminal
  87. #
  88. echo ""
  89. echo "Adding ORAKITPATH definitions to .profile and .login files..." | tee -a $LOG
  90. echo ""
  91. if grep 'ORAKITPATH='  $ORACLE_HOME/.profile > /dev/null 2>&1 ;  then
  92.    if [ "`grep 'ORAKITPATH=.*oraterm/admin/resource' $ORACLE_HOME/.profile \
  93.    2>/dev/null`" = "" ] ; then 
  94.         sed -e \
  95.         '/ORAKITPATH=/s/$/:$ORACLE_HOME\/oraterm\/admin\/resource/' \
  96.         $ORACLE_HOME/.profile > /tmp/.profile$$
  97.     mv /tmp/.profile$$ $ORACLE_HOME/.profile
  98.    fi
  99. else
  100.         echo 'ORAKITPATH=.:$ORACLE_HOME/oraterm/admin/resource
  101. export ORAKITPATH' >> $ORACLE_HOME/.profile
  102. fi
  103.  
  104. if grep 'ORAKITPATH'  $ORACLE_HOME/.login > /dev/null 2>&1 ;  then
  105.    if [ "`grep 'ORAKITPATH.*oraterm/admin/resource' $ORACLE_HOME/.login \
  106.    2>/dev/null`" = "" ] ; then 
  107.         sed -e \
  108.         '/ORAKITPATH/s/$/:$ORACLE_HOME\/oraterm\/admin\/resource/' \
  109.         $ORACLE_HOME/.login > /tmp/.login$$
  110.     mv /tmp/.login$$ $ORACLE_HOME/.login
  111.     fi
  112. else
  113.         echo 'setenv ORAKITPATH .:$ORACLE_HOME/oraterm/admin/resource' >> $ORACLE_HOME/.login
  114. fi
  115.  
  116. #
  117. #  Use "touch" to time stamp hidden file, for future verification of
  118. #  product installation.
  119. touch "$ORACLE_HOME/$product/install/.$product" 2> /dev/null
  120.  
  121. #
  122. #  Do any cleanup and exit this script.
  123. #
  124. echo ""
  125. case $UPDATE in
  126.     Y) echo "$MKTG_NAME update completed." | tee -a $LOG ;;
  127.     *) echo "$MKTG_NAME installation completed." | tee -a $LOG ;;
  128. esac
  129. echo ""
  130. sync;sync;sync
  131. exit 0
  132.