home *** CD-ROM | disk | FTP | other *** search
- :
-
- #
- # $Header: c.in.pp,v 6.33 89/09/27 15:49:07 rafsarif Exp $ c.in.pp
- #
-
- #
- # c.install
- #
- # This is the installation script to install Pro*C on a
- # UNIX ORACLE system.
- #
- # It can be invoked by the master installation script, oracle.install,
- # or as a stand alone procedure.
- #
- # The master script, oracle.install, sets ORACLE_HOME,
- # and LOG before it runs this script.
- # If the script is run stand-alone, then these variables must be set and
- # exported before it is run.
- #
- # Default answers are shown in square brackets.
- #
-
- 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"
-
- #
- # Initialize variables used in installation script.
- #
- PRODUCT=C
- product=c
- MKTG_NAME=Pro*C
-
- #
- # Setup the environment variables for the installation script.
- #
- . $ORACLE_HOME/install/setup.ins
-
- #
- # "install" user utilities
- #
- cd $ORACLE_HOME/bin
- chmod 751 pcc 2>/dev/null
-
- #FILE_LIST=`cat ${ORACLE_HOME}/${product}/install/${PRODUCT}.DIST`
-
- #
- # Move/copy/link any files which are installed in a directory different
- # from the one that they are distributed in.
- #
- echo ""
- echo "Installing $MKTG_NAME files..." | tee -a $LOG
- echo ""
-
- rm -f $ORACLE_HOME/${product}/lib/ORACA.H 2> /dev/null
- rm -f $ORACLE_HOME/${product}/lib/SQLCA.H 2> /dev/null
- rm -f $ORACLE_HOME/${product}/lib/SQLDA.H 2> /dev/null
- rm -f $ORACLE_HOME/${product}/demo/proc.mk 2> /dev/null
- ln $ORACLE_HOME/$product/lib/oraca.h $ORACLE_HOME/$product/lib/ORACA.H 2> /dev/null
- ln $ORACLE_HOME/$product/lib/sqlca.h $ORACLE_HOME/$product/lib/SQLCA.H 2> /dev/null
- ln $ORACLE_HOME/$product/lib/sqlda.h $ORACLE_HOME/$product/lib/SQLDA.H 2> /dev/null
- ln $ORACLE_HOME/$product/lib/proc.mk $ORACLE_HOME/$product/demo/proc.mk 2> /dev/null
-
- #
- # Remove the dummy entry in libpro.a and replace the real libc.a instead
- #
- echo ""
- echo "Adding $MKTG_NAME library to $ORACLE_HOME/rdbms/lib/libpro.a..." | tee -a $LOG
- echo ""
- ar d $ORACLE_HOME/rdbms/lib/libpro.a pc2dum.o > /dev/null 2>&1
- $ORACLE_HOME/install/mergelib -d$ORACLE_HOME/rdbms/lib -olibpro.a $ORACLE_HOME/${product}/lib/lib${product}.a >> $LOG 2>&1
-
- #
- # Link pcc (in the lib directory) and put it into the bin directory.
- #
- if [ "$LINK_PRODUCT" = "T" ] ; then
- cd $ORACLE_HOME/${product}/lib
- echo ""
- echo "Linking and installing $MKTG_NAME executables..." | tee -a $LOG
- echo ""
- $MAKE -f proc.mk ORACLE_HOME=$ORACLE_HOME install >> $LOG 2>&1
- if [ $? = 0 ] ; then
- case $SUPER_USER in
- TRUE) $CHOWN $ORACLE_OWNER $ORACLE_HOME/bin/pcc ;;
- esac
- else
- echo "
- Relinking Error.
- The executable for $MKTG_NAME was not made successfully.
- Please check the log file, and repeat the installation
- procedure for $MKTG_NAME.
- " | tee -a $LOG
- fi
- fi
-
- #
- # Use "touch" to time stamp hidden file, for future verification of
- # product installation.
- touch "$ORACLE_HOME/$product/install/.$product" 2> /dev/null
-
- #
- # Hook for verification scripts -- this must happen last
- #
- case $ORACLE_VERIFY in
- T) if [ -f $ORACLE_HOME/$product/install/${product}.verify ] ; then
- ORACLE_INSTALL=T ; export ORACLE_INSTALL
- chmod 755 $ORACLE_HOME/$product/install/${product}.verify
- $ORACLE_HOME/$product/install/${product}.verify
- fi ;;
- esac
-
- #
- # Do any cleanup and exit this script.
- #
- echo ""
- case $UPDATE in
- Y) echo "$MKTG_NAME update completed." | tee -a $LOG ;;
- *) echo "$MKTG_NAME installation completed." | tee -a $LOG ;;
- esac
- echo ""
- sync;sync;sync
- exit 0
-