home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-10-25 | 30.0 KB | 1,124 lines |
- #!/bin/sh
- # Copyright 1994-1996, NeXT Software, Inc. All Rights Reserved.
-
- clear
-
- PDO_OSVERS=`uname -r`
-
- case `uname` in
- SunOS)
- version=`echo $PDO_OSVERS | sed 's/\..*//'`
- if [ $version = "5" ]; then
- PDO_OSDIR=SOLARIS
- PATH=/usr/5bin:/bin:/usr/bin:/usr/sbin:/usr/ucb:$PATH
- GREPQUIETLY="/bin/egrep -s"
- PSALL="/bin/ps -ef"
- ECHO="/usr/ucb/echo -n"
- NNL=
- else
- echo "*** Unsupported operating system: " `uname`
- exit 1
- fi
- ;;
- HP-UX)
- PDO_OSDIR=HP-UX
- GREPQUIETLY="grep -q"
- PSALL="/bin/ps -ef"
- ECHO=echo
- NNL="\c"
- ;;
- *)
- echo "*** Unsupported operating system: " `uname`
- exit 1
- ;;
- esac
-
- PDO_INSTALLING=YES
-
- PDO_DIR=`pwd`
-
- if [ -f $PDO_DIR/$PDO_OSDIR/PDOUSER.TAR.Z ]; then
- PDO_USER_PACKAGE=$PDO_DIR/$PDO_OSDIR/PDOUSER.TAR.Z
- elif [ -f $PDO_DIR/$PDO_OSDIR/pdouser.TAR.Z ]; then
- PDO_USER_PACKAGE=$PDO_DIR/$PDO_OSDIR/pdouser.TAR.Z
- elif [ -f $PDO_DIR/PDOUSER.TAR.Z ]; then
- PDO_USER_PACKAGE=$PDO_DIR/PDOUSER.TAR.Z
- elif [ -f $PDO_DIR/pdouser.TAR.Z ]; then
- PDO_USER_PACKAGE=$PDO_DIR/pdouser.TAR.Z
- fi
- if [ -f $PDO_DIR/$PDO_OSDIR/PDODEV.TAR.Z ]; then
- PDO_DEV_PACKAGE=$PDO_DIR/$PDO_OSDIR/PDODEV.TAR.Z
- elif [ -f $PDO_DIR/$PDO_OSDIR/pdodev.TAR.Z ]; then
- PDO_DEV_PACKAGE=$PDO_DIR/$PDO_OSDIR/pdodev.TAR.Z
- elif [ -f $PDO_DIR/PDODEV.TAR.Z ]; then
- PDO_DEV_PACKAGE=$PDO_DIR/PDODEV.TAR.Z
- elif [ -f $PDO_DIR/pdodev.TAR.Z ]; then
- PDO_DEV_PACKAGE=$PDO_DIR/pdodev.TAR.Z
- fi
- if [ -f $PDO_DIR/$PDO_OSDIR/EOUSER.TAR.Z ]; then
- PDO_EOUSER_PACKAGE=$PDO_DIR/$PDO_OSDIR/EOUSER.TAR.Z
- elif [ -f $PDO_DIR/$PDO_OSDIR/eouser.TAR.Z ]; then
- PDO_EOUSER_PACKAGE=$PDO_DIR/$PDO_OSDIR/eouser.TAR.Z
- elif [ -f $PDO_DIR/EOUSER.TAR.Z ]; then
- PDO_EOUSER_PACKAGE=$PDO_DIR/EOUSER.TAR.Z
- elif [ -f $PDO_DIR/eouser.TAR.Z ]; then
- PDO_EOUSER_PACKAGE=$PDO_DIR/eouser.TAR.Z
- fi
- if [ -f $PDO_DIR/$PDO_OSDIR/EODEV.TAR.Z ]; then
- PDO_EODEV_PACKAGE=$PDO_DIR/$PDO_OSDIR/EODEV.TAR.Z
- elif [ -f $PDO_DIR/$PDO_OSDIR/eodev.TAR.Z ]; then
- PDO_EODEV_PACKAGE=$PDO_DIR/$PDO_OSDIR/eodev.TAR.Z
- elif [ -f $PDO_DIR/EODEV.TAR.Z ]; then
- PDO_EODEV_PACKAGE=$PDO_DIR/EODEV.TAR.Z
- elif [ -f $PDO_DIR/eodev.TAR.Z ]; then
- PDO_EODEV_PACKAGE=$PDO_DIR/eodev.TAR.Z
- fi
- if [ -f $PDO_DIR/$PDO_OSDIR/WOUSER.TAR.Z ]; then
- PDO_WOUSER_PACKAGE=$PDO_DIR/$PDO_OSDIR/WOUSER.TAR.Z
- elif [ -f $PDO_DIR/$PDO_OSDIR/wouser.TAR.Z ]; then
- PDO_WOUSER_PACKAGE=$PDO_DIR/$PDO_OSDIR/wouser.TAR.Z
- elif [ -f $PDO_DIR/WOUSER.TAR.Z ]; then
- PDO_WOUSER_PACKAGE=$PDO_DIR/WOUSER.TAR.Z
- elif [ -f $PDO_DIR/wouser.TAR.Z ]; then
- PDO_WOUSER_PACKAGE=$PDO_DIR/wouser.TAR.Z
- fi
- if [ -f $PDO_DIR/$PDO_OSDIR/WODEV.TAR.Z ]; then
- PDO_WODEV_PACKAGE=$PDO_DIR/$PDO_OSDIR/WODEV.TAR.Z
- elif [ -f $PDO_DIR/$PDO_OSDIR/wodev.TAR.Z ]; then
- PDO_WODEV_PACKAGE=$PDO_DIR/$PDO_OSDIR/wodev.TAR.Z
- elif [ -f $PDO_DIR/WODEV.TAR.Z ]; then
- PDO_WODEV_PACKAGE=$PDO_DIR/WODEV.TAR.Z
- elif [ -f $PDO_DIR/wodev.TAR.Z ]; then
- PDO_WODEV_PACKAGE=$PDO_DIR/wodev.TAR.Z
- fi
- if [ -f $PDO_DIR/$PDO_OSDIR/LOCAL.TAR.Z ]; then
- PDO_LOCAL_PACKAGE=$PDO_DIR/$PDO_OSDIR/LOCAL.TAR.Z
- elif [ -f $PDO_DIR/$PDO_OSDIR/local.TAR.Z ]; then
- PDO_LOCAL_PACKAGE=$PDO_DIR/$PDO_OSDIR/local.TAR.Z
- elif [ -f $PDO_DIR/LOCAL.TAR.Z ]; then
- PDO_LOCAL_PACKAGE=$PDO_DIR/LOCAL.TAR.Z
- elif [ -f $PDO_DIR/local.TAR.Z ]; then
- PDO_LOCAL_PACKAGE=$PDO_DIR/local.TAR.Z
- fi
-
- PDO_INSTALL_USER=YES
-
- if [ x != x$PDO_AUTOMATIC_INSTALL ]; then
- # Leave this feature undocumented for now; if the file
- # is wrong, you may lose big time. Also, we may change
- # the way things are done in the future, and we do not
- # want any backwards compatibility issues.
-
- echo "Beginning automatic PDO install."
-
- . $PDO_AUTOMATIC_INSTALL
-
- else
- # Normal question and answer installation
-
- if [ x != x$PDO_WOUSER_PACKAGE ]; then
- # Normal question and answer WOF installation
- echo ""
- echo "Welcome to the WebObjects installation program!"
- echo ""
- echo ""
- PDO_PRODUCT=WebObjects
- PDO_INSTALL_DIR=/opt/WOF/3.0
- while [ x = x$PDO_WOF_LICENSE ]; do
- echo ""
- $ECHO "Enter serial number: " $NNL
- read answer
- case $answer in
- AMX* | ANG* )
- PDO_WOF_PRODUCT="WebObjects Pro Developer"
- ;;
- ANA* | ANE* )
- PDO_WOF_PRODUCT="WebObjects Enterprise Developer"
- ;;
- AMY* | ANH* )
- PDO_WOF_PRODUCT="WebObjects Pro Deployment"
- ;;
- ANB* | ANF* )
- PDO_WOF_PRODUCT="WebObjects Enterprise Deployment"
- ;;
- ANC* )
- PDO_WOF_PRODUCT="WebObjects Academic"
- ;;
- "")
- echo "No installation has been performed."
- exit 0
- ;;
- *)
- echo "Unrecognized serial number; try again."
- continue
- ;;
- esac
- PDO_WOF_LICENSE=$answer
- echo ""
- echo "You are about to install $PDO_WOF_PRODUCT."
- $ECHO "Continue? [ynq] " $NNL
- read answer
- case $answer in
- q | Q | QUIT | quit | Quit)
- echo "No installation has been performed."
- exit 0
- ;;
- y | Y | YES | yes | Yes)
- ;;
- *)
- PDO_WOF_LICENSE=
- ;;
- esac
- done
- case $PDO_WOF_LICENSE in
- AMX* | ANA* | ANG* | ANE* )
- PDO_INSTALL_USER=YES
- PDO_INSTALL_DEV=YES
- PDO_INSTALL_WOUSER=YES
- PDO_INSTALL_WODEV=YES
- PDO_INSTALL_EOUSER=YES
- PDO_INSTALL_EODEV=YES
- ;;
- AMY* | ANB* | ANC* | ANH* | ANF* )
- PDO_INSTALL_USER=YES
- PDO_INSTALL_DEV=NO
- PDO_INSTALL_WOUSER=YES
- PDO_INSTALL_WODEV=NO
- PDO_INSTALL_EOUSER=YES
- PDO_INSTALL_EODEV=NO
- ;;
- esac
- else
- # Normal question and answer PDO/EOF installation
- echo ""
- echo "Welcome to the PDO/EOF installation program!"
- echo ""
- echo ""
- PDO_PRODUCT=PDO
- PDO_INSTALL_DIR=/opt/PDO/4.1
- echo "Do you want the PDO developer tools installed (in addition"
- $ECHO "to the PDO runtime)? [ynq] " $NNL
- read answer
- case $answer in
- q | Q | QUIT | quit | Quit)
- echo "No installation has been performed."
- exit 0
- ;;
- y | Y | YES | yes | Yes)
- PDO_INSTALL_DEV=YES
- ;;
- *)
- PDO_INSTALL_DEV=NO
- ;;
- esac
-
- echo ""
- $ECHO "Do you want to install EOF in addition to PDO? [ynq] " $NNL
- read answer
- case $answer in
- q | Q | QUIT | quit | Quit)
- echo "No installation has been performed."
- exit 0
- ;;
- y | Y | YES | yes | Yes)
- PDO_INSTALL_EOUSER=YES
- ;;
- *)
- PDO_INSTALL_EOUSER=NO
- ;;
- esac
-
- if [ xYES = x$PDO_INSTALL_EOUSER -a xYES = x$PDO_INSTALL_DEV ]; then
- echo ""
- $ECHO "Do you want to install the EOF developer tools also? [ynq] " $NNL
- read answer
- case $answer in
- q | Q | QUIT | quit | Quit)
- echo "No installation has been performed."
- exit 0
- ;;
- y | Y | YES | yes | Yes)
- PDO_INSTALL_EODEV=YES
- ;;
- *)
- PDO_INSTALL_EODEV=NO
- ;;
- esac
- fi
- fi
-
- if [ x != x$PDO_LOCAL_PACKAGE ]; then
- echo ""
- echo "This installation contains the local software package. Do you wish"
- $ECHO "to install the local software on your system? [ynq] " $NNL
- read answer
- case $answer in
- q | Q | QUIT | quit | Quit)
- echo "No installation has been performed."
- exit 0
- ;;
- y | Y | YES | yes | Yes)
- PDO_INSTALL_LOCAL=YES
- ;;
- *)
- PDO_INSTALL_LOCAL=NO
- ;;
- esac
- fi
-
- PDO_RENAME_INSTALL_DIR=NO
- PDO_REUSE_INSTALL_DIR=NO
- while `true`; do
- echo ""
- echo "Please type a directory in which to install $PDO_PRODUCT. The default"
- echo "installation location is [$PDO_INSTALL_DIR]."
- $ECHO "--> " $NNL
- read newdir
- if [ x != x$newdir ]; then
- PDO_INSTALL_DIR=$newdir
- fi
- ls $PDO_INSTALL_DIR >/dev/null 2>&1
- if [ 0 != $? ]; then
- echo ""
- echo "The directory '$PDO_INSTALL_DIR' does not exist."
- $ECHO "Shall I create it for you? [ynq] " $NNL
- read answer
- case $answer in
- q | Q | QUIT | quit | Quit)
- echo "No installation has been performed."
- exit 0
- ;;
- y | Y | YES | yes | Yes)
- ;;
- *)
- continue
- ;;
- esac
- else
- if [ -d "$PDO_INSTALL_DIR" ]; then
- echo ""
- echo "WARNING: '$PDO_INSTALL_DIR' exists and may not be empty."
- echo " 1) specify a new directory (default)"
- echo " 2) use the existing directory (not recommended)"
- echo " 3) rename the existing directory"
- echo " 4) delete the existing directory"
- echo " 5) cancel the installation"
- $ECHO "--> " $NNL
- read choice
- case $choice in
- 1 | "" )
- continue
- ;;
- 2)
- PDO_REUSE_INSTALL_DIR=YES
- ;;
- 3)
- PDO_RENAME_INSTALL_DIR=YES
- ;;
- 4)
- ;;
- *)
- echo "No installation has been performed."
- exit 0
- ;;
- esac
- else
- echo ""
- echo "WARNING: '$PDO_INSTALL_DIR' exists and is not a directory."
- echo " 1) specify a new directory"
- echo " 2) delete the file"
- echo " 3) cancel the installation"
- $ECHO "--> " $NNL
- read choice
- case $choice in
- 1 | "" )
- continue
- ;;
- 2)
- ;;
- *)
- echo "No installation has been performed."
- exit 0
- ;;
- esac
- fi
- fi
-
- echo ""
- echo "The release will be installed:"
- echo ""
- echo " From: '$PDO_DIR'"
- echo " To: '$PDO_INSTALL_DIR'"
- echo ""
- $ECHO "Is this correct? [ynq] " $NNL
- read answer
- case $answer in
- q | Q | QUIT | quit | Quit)
- echo "No installation has been performed."
- exit 0
- ;;
- y | Y | YES | yes | Yes)
- break
- ;;
- *)
- ;;
- esac
- done
-
- PDO_CGIBIN_DIR=
- PDO_HTTPDOC_DIR=
- if [ x != x$PDO_WOF_LICENSE ]; then
- while `true`; do
- echo ""
- echo "Please type the cgi-bin (script) directory which your http server"
- echo "uses. You do not need to specify this now (leave the response"
- echo "field blank), if your http server is on another machine or you want"
- echo "to configure this yourself later."
- $ECHO "--> " $NNL
- read PDO_CGIBIN_DIR
- if [ x != x$PDO_CGIBIN_DIR ]; then
- ls $PDO_CGIBIN_DIR >/dev/null 2>&1
- if [ 0 != $? ]; then
- echo ""
- echo "The directory '$PDO_CGIBIN_DIR' does not exist."
- $ECHO "Shall I create it for you? [ynq] " $NNL
- read answer
- case $answer in
- q | Q | QUIT | quit | Quit)
- echo "No installation has been performed."
- exit 0
- ;;
- y | Y | YES | yes | Yes)
- ;;
- *)
- continue
- ;;
- esac
- fi
- fi
- break
- done
-
- while `true`; do
- echo ""
- echo "Please type the http document root directory which your httpd server"
- echo "uses. You do not need to specify this now (leave the response"
- echo "field blank), if your http server is on another machine or you want"
- echo "to configure this yourself later."
- $ECHO "--> " $NNL
- read PDO_HTTPDOC_DIR
- if [ x != x$PDO_HTTPDOC_DIR ]; then
- ls $PDO_HTTPDOC_DIR >/dev/null 2>&1
- if [ 0 != $? ]; then
- echo ""
- echo "The directory '$PDO_HTTPDOC_DIR' does not exist."
- $ECHO "Shall I create it for you? [ynq] " $NNL
- read answer
- case $answer in
- q | Q | QUIT | quit | Quit)
- echo "No installation has been performed."
- exit 0
- ;;
- y | Y | YES | yes | Yes)
- ;;
- *)
- continue
- ;;
- esac
- fi
- fi
- break
- done
- fi
-
- ls /NextDeveloper >/dev/null 2>&1
- nextdeveloperExists=$?
- ls /NextLibrary >/dev/null 2>&1
- nextlibraryExists=$?
-
- PDO_CREATE_LINKS=YES
- if [ 0 != $nextdeveloperExists -a 0 != $nextlibraryExists ]; then
- true
- elif [ 0 = $nextdeveloperExists -a 0 = $nextlibraryExists ]; then
- echo ""
- echo "WARNING: One or more of the files/directories:"
- echo " /NextDeveloper"
- echo " /NextLibrary"
- echo "already exist. You can:"
- echo " 1) delete the existing files/directories (default)"
- echo " 2) rename the existing files/directories"
- echo " 3) cancel the installation"
- $ECHO "--> " $NNL
- read choice
- case $choice in
- 1 | "" )
- ;;
- 2)
- PDO_RENAME_LINKS=YES
- ;;
- *)
- echo "No installation has been performed."
- exit 0
- ;;
- esac
- fi
-
- echo ""
- echo "Do you want links to $PDO_INSTALL_DIR/NextDeveloper and"
- $ECHO "$PDO_INSTALL_DIR/NextLibrary created in /usr? [ynq] " $NNL
- read answer
- case $answer in
- q | Q | QUIT | quit | Quit)
- echo "No installation has been performed."
- exit 0
- ;;
- y | Y | YES | yes | Yes)
- PDO_CREATE_USRLINKS=YES
- ;;
- *)
- PDO_CREATE_USRLINKS=NO
- ;;
- esac
-
- if [ xYES = x$PDO_CREATE_USRLINKS ]; then
- ls /usr/NextDeveloper >/dev/null 2>&1
- usrnextdeveloperExists=$?
- ls /usr/NextLibrary >/dev/null 2>&1
- usrnextlibraryExists=$?
-
- if [ 0 != $usrnextdeveloperExists -a 0 != $usrnextlibraryExists ]; then
- true
- elif [ 0 = $usrnextdeveloperExists -a 0 = $usrnextlibraryExists ]; then
- echo ""
- echo "WARNING: One or more of the files/directories:"
- echo " /usr/NextDeveloper"
- echo " /usr/NextLibrary"
- echo "already exist. You can:"
- echo " 1) delete the existing files/directories (default)"
- echo " 2) rename the existing files/directories"
- echo " 3) cancel the installation"
- $ECHO "--> " $NNL
- read choice
- case $choice in
- 1 | "" )
- ;;
- 2)
- PDO_RENAME_LINKS=YES
- ;;
- *)
- echo "No installation has been performed."
- exit 0
- ;;
- esac
- fi
- fi
-
- $PSALL | $GREPQUIETLY -v grep | $GREPQUIETLY machd
- if [ 0 != $? ]; then
- echo ""
- echo "The running PDO services should be terminated before beginning"
- $ECHO "installation. Do you want them terminated? [ynq] " $NNL
- read answer
- case $answer in
- q | Q | QUIT | quit | Quit)
- echo "No installation has been performed."
- exit 0
- ;;
- y | Y | YES | yes | Yes)
- PDO_TERMINATE_DAEMONS=YES
- ;;
- *)
- PDO_TERMINATE_DAEMONS=NO
- ;;
- esac
- fi
-
- echo ""
- echo "Foundation's NSString class supports a number of different character"
- echo "encodings for C strings, including ASCII, NEXTSTEP, Japanese EUC,"
- echo "ISOLatin1, and Unicode. The default encoding is NEXTSTEP encoding."
- echo "Japanese users may wish this encoding to be Japanese EUC. Do you"
- echo "wish to use the Japanese EUC encoding as the default encoding for"
- $ECHO "Foundation's NSString class? [ynq] " $NNL
- read answer
- case $answer in
- q | Q | QUIT | quit | Quit)
- echo "No installation has been performed."
- exit 0
- ;;
- y | Y | YES | yes | Yes)
- PDO_USE_EUC_ENCODING=YES
- ;;
- *)
- PDO_USE_EUC_ENCODING=NO
- ;;
- esac
-
- if [ xYES = x$PDO_INSTALL_DEV ]; then
- echo ""
- echo "Some system include files are incompatible with the ANSI standard."
- echo "If you choose, the incompatible system header files will be copied"
- echo "to an alternate location and modified to be ANSI compatible. Most"
- echo "$PDO_PRODUCT programs will not compile without these fixes. Do you want"
- $ECHO "to fix your header files to be ANSI-compatible? [ynq] " $NNL
- read answer
- case $answer in
- q | Q | QUIT | quit | Quit)
- echo "No installation has been performed."
- exit 0
- ;;
- n | N | NO | no | No)
- PDO_RUN_FIXINCLUDES=NO
- ;;
- *)
- PDO_RUN_FIXINCLUDES=YES
- ;;
- esac
- fi
- fi
-
-
- if [ x = x$PDO_PRODUCT ]; then
- if [ -d /NextLibrary/Receipts/WOF ]; then
- PDO_PRODUCT=WebObjects
- else
- PDO_PRODUCT=PDO
- fi
- fi
-
- if [ \( xYES = x$PDO_INSTALLING -a x = x$PDO_AUTOMATIC_INSTALL \) -o x = x$PDO_INSTALLING ]; then
- # Normal question and answer enablement
-
- echo ""
- echo "$PDO_PRODUCT programs require some support services to be enabled. You"
- echo "can start them by hand by executing '/NextDeveloper/etc/rc.pdo', or"
- echo "you can have the operating system startup commands be modified for"
- echo "you so that PDO services will always be running after every reboot."
- $ECHO "Do you want PDO services to run at boot time? [ynq] " $NNL
- read answer
- case $answer in
- q | Q | QUIT | quit | Quit)
- if [ xYES = x$PDO_INSTALLING ]; then
- echo "No installation has been performed."
- exit 0
- else
- echo "PDO not enabled."
- exit 0
- fi
- ;;
- y | Y | YES | yes | Yes)
- PDO_ENABLE_BOOT_START=YES
- ;;
- *)
- PDO_ENABLE_BOOT_START=NO
- ;;
- esac
-
- echo ""
- if [ xYES = x$PDO_INSTALLING ]; then
- $ECHO "Do you want PDO services started during installation? [ynq] " $NNL
- else
- $ECHO "Do you want PDO services started now? [ynq] " $NNL
- fi
- read answer
- case $answer in
- q | Q | QUIT | quit | Quit)
- if [ xYES = x$PDO_INSTALLING ]; then
- echo "No installation has been performed."
- exit 0
- else
- echo "PDO not enabled."
- exit 0
- fi
- ;;
- y | Y | YES | yes | Yes)
- PDO_START_DAEMONS=YES
- ;;
- *)
- PDO_START_DAEMONS=NO
- ;;
- esac
-
- echo ""
- echo "You can have links to some common commands in /NextDeveloper/bin"
- echo "made in /usr/local/bin. Existing files in /usr/local/bin will not"
- echo "be modified. Would you like links to gcc, gdb, make, and mkdirs"
- $ECHO "placed in /usr/local/bin? [ynq] " $NNL
- read answer
- case $answer in
- q | Q | QUIT | quit | Quit)
- if [ xYES = x$PDO_INSTALLING ]; then
- echo "No installation has been performed."
- exit 0
- else
- echo "PDO not enabled."
- exit 0
- fi
- ;;
- y | Y | YES | yes | Yes)
- PDO_CREATE_LOCAL_LINKS=YES
- ;;
- *)
- PDO_CREATE_LOCAL_LINKS=NO
- ;;
- esac
-
- if [ SOLARIS = $PDO_OSDIR ]; then
- echo ""
- echo "The PDO library libpdo.so must be in a known location for executables"
- echo "to run. It resides in /NextDeveloper/lib. You can either have a link"
- echo "to this library installed in /usr/lib, or each $PDO_PRODUCT user/developer"
- echo "must add the path /NextDeveloper/lib to their LD_LIBRARY_PATH environment"
- $ECHO "variable. Do you want a link in /usr/lib to this library? [ynq] " $NNL
- read answer
- case $answer in
- q | Q | QUIT | quit | Quit)
- echo "No installation has been performed."
- exit 0
- ;;
- n | N | NO | no | No)
- PDO_CREATE_LIBPDO_LINK=NO
- ;;
- *)
- PDO_CREATE_LIBPDO_LINK=YES
- ;;
- esac
- fi
- fi
-
- # All questions have been asked at this point
- echo ""
- echo "There are no more questions."
-
- # The development tools require user files as well
- if [ xYES = x$PDO_INSTALL_DEV ]; then
- PDO_INSTALL_USER=YES
- fi
-
- if [ xYES = x$PDO_INSTALL_EODEV ]; then
- PDO_INSTALL_EOUSER=YES
- fi
-
- if [ xYES = x$PDO_INSTALL_WODEV ]; then
- PDO_INSTALL_WOUSER=YES
- fi
-
- # Ensure packages exist
- if [ xYES = x$PDO_INSTALL_USER ]; then
- if [ x = x$PDO_USER_PACKAGE -o ! -f "$PDO_USER_PACKAGE" ]; then
- echo "*** I was unable to find the PDO user files. Please make sure"
- echo "*** you are in the installation directory and try again. If you"
- echo "*** still have problems, please contact NeXT Support for help."
- exit 1
- fi
- fi
-
- if [ xYES = x$PDO_INSTALL_DEV ]; then
- if [ x = x$PDO_DEV_PACKAGE -o ! -f "$PDO_DEV_PACKAGE" ]; then
- echo "*** I was unable to find the PDO developer files. Please make sure"
- echo "*** you are in the installation directory and try again. If you"
- echo "*** still have problems, please contact NeXT Support for help."
- exit 1
- fi
- fi
-
- if [ xYES = x$PDO_INSTALL_EOUSER ]; then
- if [ x = x$PDO_EOUSER_PACKAGE -o ! -f "$PDO_EOUSER_PACKAGE" ]; then
- echo "*** I was unable to find the EOF user files. Please make sure"
- echo "*** you are in the installation directory and try again. If you"
- echo "*** still have problems, please contact NeXT Support for help."
- exit 1
- fi
- fi
-
- if [ xYES = x$PDO_INSTALL_EODEV ]; then
- if [ x = x$PDO_EODEV_PACKAGE -o ! -f "$PDO_EODEV_PACKAGE" ]; then
- echo "*** I was unable to find the EOF developer files. Please make sure"
- echo "*** you are in the installation directory and try again. If you"
- echo "*** still have problems, please contact NeXT Support for help."
- exit 1
- fi
- fi
-
- if [ xYES = x$PDO_INSTALL_WOUSER ]; then
- if [ x = x$PDO_WOUSER_PACKAGE -o ! -f "$PDO_WOUSER_PACKAGE" ]; then
- echo "*** I was unable to find the WOF user files. Please make sure"
- echo "*** you are in the installation directory and try again. If you"
- echo "*** still have problems, please contact NeXT Support for help."
- exit 1
- fi
- fi
-
- if [ xYES = x$PDO_INSTALL_WODEV ]; then
- if [ x = x$PDO_WODEV_PACKAGE -o ! -f "$PDO_WODEV_PACKAGE" ]; then
- echo "*** I was unable to find the WOF developer files. Please make sure"
- echo "*** you are in the installation directory and try again. If you"
- echo "*** still have problems, please contact NeXT Support for help."
- exit 1
- fi
- fi
-
- if [ xYES = x$PDO_INSTALL_LOCAL ]; then
- if [ x = x$PDO_LOCAL_PACKAGE -o ! -f "$PDO_LOCAL_PACKAGE" ]; then
- echo "*** I was unable to find the PDO local files. Please make sure"
- echo "*** you are in the installation directory and try again. If you"
- echo "*** still have problems, please contact NeXT Support for help."
- exit 1
- fi
- fi
-
- if [ x = x$PDO_GNUTAR -o ! -f "$PDO_GNUTAR" ]; then
- if [ -f $PDO_DIR/$PDO_OSDIR/GNUTAR ]; then
- cp $PDO_DIR/$PDO_OSDIR/GNUTAR /tmp/gnutar
- elif [ -f $PDO_DIR/$PDO_OSDIR/gnutar ]; then
- cp $PDO_DIR/$PDO_OSDIR/gnutar /tmp/gnutar
- elif [ -f $PDO_DIR/GNUTAR ]; then
- cp $PDO_DIR/GNUTAR /tmp/gnutar
- elif [ -f $PDO_DIR/gnutar ]; then
- cp $PDO_DIR/gnutar /tmp/gnutar
- fi
- if [ ! -f /tmp/gnutar ]; then
- echo ""
- echo "WARNING: I wasn't able to find gnutar on the CD. While this won't"
- echo "be fatal if you have gnutar somewhere else on your path, it might"
- echo "indicate that you have an incomplete release. Please contact NeXT"
- echo "Support for help if any problems arise during this installation."
- PDO_GNUTAR=gnutar
- else
- chmod 755 /tmp/gnutar
- PDO_GNUTAR=/tmp/gnutar
- fi
- fi
-
- echo ""
- if [ x = x$PDO_WOF_LICENSE ]; then
- echo "Beginning PDO/EOF installation."
- else
- echo "Beginning $PDO_WOF_PRODUCT installation."
- fi
-
- # Kill daemons
- if [ xYES = x$PDO_TERMINATE_DAEMONS ]; then
- echo "Terminating PDO services."
- for p in machd nmserver ; do
- pid=`ps -ef | grep -v grep | grep $p | awk '{ print $2 }'`
- if [ x != x$pid ]; then
- kill $pid
- fi
- done
- fi
-
- # Erase everything first
- ls $PDO_INSTALL_DIR >/dev/null 2>&1
- if [ 0 = $? ]; then
- if [ xYES = x$PDO_RENAME_INSTALL_DIR ]; then
- rm -rf $PDO_INSTALL_DIR.ORIG
- mv $PDO_INSTALL_DIR $PDO_INSTALL_DIR.ORIG
- if [ 0 != $? ]; then
- echo "*** Cannot rename the existing installation directory."
- exit 1
- fi
- echo "$PDO_INSTALL_DIR has been saved as $PDO_INSTALL_DIR.ORIG"
- elif [ xNO = x$PDO_REUSE_INSTALL_DIR ]; then
- echo "Removing existing $PDO_INSTALL_DIR"
- rm -rf $PDO_INSTALL_DIR
- if [ 0 != $? ]; then
- echo "*** Cannot delete the existing installation directory."
- exit 1
- fi
- fi
- fi
-
- for d in /NextDeveloper /NextLibrary /usr/NextDeveloper /usr/NextLibrary ; do
- ls $d >/dev/null 2>&1
- if [ 0 = $? ]; then
- if [ xYES = x$PDO_RENAME_LINKS ]; then
- rm -rf $d.ORIG
- mv $d $d.ORIG
- if [ 0 != $? ]; then
- echo "*** Cannot rename the existing $d directory."
- exit 1
- fi
- echo "$d has been saved as $d.ORIG"
- else
- rm -r $d
- if [ 0 != $? ]; then
- echo "*** Cannot delete the existing $d directory."
- exit 1
- fi
- fi
- fi
- done
-
- # Create structure
- echo "Creating installation directory and links."
- mkdir -p $PDO_INSTALL_DIR >/dev/null 2>&1
- if [ ! -d "$PDO_INSTALL_DIR" ]; then
- echo "*** Cannot create the installation directory."
- exit 1
- fi
-
- if [ xYES = x$PDO_CREATE_LINKS ]; then
- for d in /NextDeveloper /NextLibrary ; do
- ln -s $PDO_INSTALL_DIR/$d $d
- if [ 0 != $? ]; then
- echo "*** Cannot create the $d link."
- exit 1
- fi
- if [ xYES = x$PDO_CREATE_USRLINKS ]; then
- ln -s $d /usr/$d
- if [ 0 != $? ]; then
- echo "*** Cannot create the /usr$d link."
- exit 1
- fi
- fi
- done
- fi
-
- # Unarchive PDO User
- if [ xYES = x$PDO_INSTALL_USER ]; then
- echo "Installing PDO runtime."
- (cd $PDO_INSTALL_DIR; $PDO_GNUTAR -xZf $PDO_USER_PACKAGE)
- if [ 0 != $? ]; then
- echo "*** There appear to have been some problems installing the PDO runtime."
- exit 1
- fi
- fi
-
- # Unarchive PDO Developer
- if [ xYES = x$PDO_INSTALL_DEV ]; then
- echo "Installing PDO development tools."
- (cd $PDO_INSTALL_DIR; $PDO_GNUTAR -xZf $PDO_DEV_PACKAGE)
- if [ 0 != $? ]; then
- echo "*** There appear to have been some problems installing the PDO developer tools."
- exit 1
- fi
- fi
-
- # Unarchive EOF User
- if [ xYES = x$PDO_INSTALL_EOUSER ]; then
- echo "Installing EOF runtime."
- (cd $PDO_INSTALL_DIR; $PDO_GNUTAR -xZf $PDO_EOUSER_PACKAGE)
- if [ 0 != $? ]; then
- echo "*** There appear to have been some problems installing the EOF runtime."
- exit 1
- fi
- fi
-
- # Unarchive EOF Developer
- if [ xYES = x$PDO_INSTALL_EODEV ]; then
- echo "Installing EOF development tools."
- (cd $PDO_INSTALL_DIR; $PDO_GNUTAR -xZf $PDO_EODEV_PACKAGE)
- if [ 0 != $? ]; then
- echo "*** There appear to have been some problems installing the EOF developer tools."
- exit 1
- fi
- fi
-
- # Unarchive WOF User
- if [ xYES = x$PDO_INSTALL_WOUSER ]; then
- echo "Installing WOF runtime."
- (cd $PDO_INSTALL_DIR; $PDO_GNUTAR -xZf $PDO_WOUSER_PACKAGE)
- if [ 0 != $? ]; then
- echo "*** There appear to have been some problems installing the WOF runtime."
- exit 1
- fi
- fi
-
- # Unarchive WOF Developer
- if [ xYES = x$PDO_INSTALL_WODEV ]; then
- echo "Installing WOF development tools."
- (cd $PDO_INSTALL_DIR; $PDO_GNUTAR -xZf $PDO_WODEV_PACKAGE)
- if [ 0 != $? ]; then
- echo "*** There appear to have been some problems installing the WOF developer tools."
- exit 1
- fi
- fi
-
- # Unarchive local archive
- if [ xYES = x$PDO_INSTALL_LOCAL ]; then
- if [ xYES = x$PDO_CREATE_LINKS ]; then
- for d in /LocalDeveloper ; do
- rm -rf $d
- if [ 0 != $? ]; then
- echo "*** Cannot delete $d."
- exit 1
- fi
- rm -rf /usr/$d
- if [ 0 != $? ]; then
- echo "*** Cannot delete /usr$d."
- exit 1
- fi
- ln -s $PDO_INSTALL_DIR/$d $d
- if [ 0 != $? ]; then
- echo "*** Cannot create the $d link."
- exit 1
- fi
- if [ xYES = x$PDO_CREATE_USRLINKS ]; then
- ln -s $d /usr/$d
- if [ 0 != $? ]; then
- echo "*** Cannot create the /usr$d link."
- exit 1
- fi
- fi
- done
- fi
- echo "Installing local files."
- (cd $PDO_INSTALL_DIR; $PDO_GNUTAR -xZf $PDO_LOCAL_PACKAGE)
- if [ 0 != $? ]; then
- echo "*** There appear to have been some problems installing the local files."
- exit 1
- fi
- fi
-
- # copy the software.ver off the CD
- if [ xYES = x$PDO_INSTALL_USER -o xYES = x$PDO_INSTALL_DEV ]; then
- mkdir -p $PDO_INSTALL_DIR/NextLibrary/Receipts/PDO
- cp $PDO_DIR/software.ver $PDO_INSTALL_DIR/NextLibrary/Receipts/PDO
- echo "PDO_PRODUCT=$PDO_PRODUCT" >> $PDO_INSTALL_DIR/NextLibrary/Receipts/PDO/uninstall.info
- echo "PDO_INSTALL_DIR=$PDO_INSTALL_DIR" >> $PDO_INSTALL_DIR/NextLibrary/Receipts/PDO/uninstall.info
- echo "PDO_CGIBIN_DIR=$PDO_CGIBIN_DIR" >> $PDO_INSTALL_DIR/NextLibrary/Receipts/PDO/uninstall.info
- echo "PDO_HTTPDOC_DIR=$PDO_HTTPDOC_DIR" >> $PDO_INSTALL_DIR/NextLibrary/Receipts/PDO/uninstall.info
- fi
- if [ xYES = x$PDO_INSTALL_EOUSER -o xYES = x$PDO_INSTALL_EODEV ]; then
- mkdir -p $PDO_INSTALL_DIR/NextLibrary/Receipts/EOF
- cp $PDO_DIR/software.ver $PDO_INSTALL_DIR/NextLibrary/Receipts/EOF
- fi
- if [ xYES = x$PDO_INSTALL_WOUSER -o xYES = x$PDO_INSTALL_WODEV ]; then
- mkdir -p $PDO_INSTALL_DIR/NextLibrary/Receipts/WOF
- cp $PDO_DIR/software.ver $PDO_INSTALL_DIR/NextLibrary/Receipts/WOF
- fi
-
- if [ xYES = x$PDO_USE_EUC_ENCODING ]; then
- echo "3" > $PDO_INSTALL_DIR/NextLibrary/Frameworks/Foundation.framework/Resources/CStringEncoding
- fi
-
- # Enable the DCE stuff
- if [ $PDO_OSDIR = HP-UX ]; then
- for f in /usr/lib/libcma.sl /usr/lib/libcma.1 ; do
- if [ ! -f $f ]; then
- echo "*** WARNING: unable to find $f. The DCE"
- echo "*** software is required to run $PDO_PRODUCT programs."
- exit 1
- fi
- done
-
- # Create symlinks in PDODIR, so gcc knows where to look for DCE stuff.
- rm -f /NextDeveloper/lib/libdce.a
- rm -f /NextDeveloper/lib/libc_r.a
- rm -f /NextDeveloper/lib/libpdocma.a
- rm -f /NextDeveloper/lib/libpdocma.sl
- rm -f /NextDeveloper/lib/libcma.1
-
- mkdir -p /NextDeveloper/lib
- ln -s /usr/lib/libcma.sl /NextDeveloper/lib/libpdocma.sl
- ln -s /usr/lib/libcma.1 /NextDeveloper/lib/libcma.1
- fi
-
- if [ x != x$PDO_CGIBIN_DIR ]; then
- mkdir -p $PDO_CGIBIN_DIR >/dev/null 2>&1
- ln -s /NextLibrary/WOAdaptors/CGI/WebObjects $PDO_CGIBIN_DIR
- fi
-
- if [ x != x$PDO_HTTPDOC_DIR ]; then
- mkdir -p $PDO_HTTPDOC_DIR/WebObjects >/dev/null 2>&1
- ln -s /NextDeveloper/Examples/WebObjects $PDO_HTTPDOC_DIR/WebObjects/Examples
- ln -s /NextLibrary/Java $PDO_HTTPDOC_DIR/WebObjects
- fi
-
- if [ x != x$PDO_WOF_LICENSE ]; then
- sh $PDO_INSTALL_DIR/NextDeveloper/bin/license.sh $PDO_INSTALL_DIR $PDO_WOF_LICENSE
- rm -f $PDO_INSTALL_DIR/NextDeveloper/bin/license.sh
- fi
-
- # Don't need gnutar anymore
- if [ -f /tmp/gnutar ]; then
- rm -f /tmp/gnutar
- fi
-
- # cd off the CDROM so it can be unmounted
- cd /
-
-
- # All questions have been asked at this point
-
- echo ""
- echo "Beginning PDO enablement."
-
- # Enable boot-time service startup
- if [ xYES = x$PDO_ENABLE_BOOT_START ]; then
- echo "Enabling boot-time service startup."
- case $PDO_OSDIR in
- SOLARIS)
- cp /NextDeveloper/etc/NeXTpdo /etc/init.d
- rm -f /etc/rc0.d/K*NeXTpdo
- rm -f /etc/rc1.d/K*NeXTpdo
- rm -f /etc/rc2.d/S*NeXTpdo
- ln /etc/init.d/NeXTpdo /etc/rc0.d/K54NeXTpdo
- ln /etc/init.d/NeXTpdo /etc/rc1.d/K54NeXTpdo
- ln /etc/init.d/NeXTpdo /etc/rc2.d/S78NeXTpdo
- ;;
- HP-UX)
- case $PDO_OSVERS in
- B.10.*)
- cp /NextDeveloper/etc/NeXTpdo /sbin/init.d
- rm -f /sbin/rc0.d/K*NeXTpdo
- rm -f /sbin/rc2.d/S*NeXTpdo
- ln /sbin/init.d/NeXTpdo /sbin/rc0.d/K176NeXTpdo
- ln /sbin/init.d/NeXTpdo /sbin/rc2.d/S780NeXTpdo
- ;;
- *)
- echo ""
- echo "*** Unsupported HP-UX version " $PDO_OSVERS
- echo "*** Cannot install the startup scripts."
- ;;
- esac
- ;;
- esac
- fi
-
- # Set up /usr/local/bin symlinks
- if [ xYES = x$PDO_CREATE_LOCAL_LINKS ]; then
- echo "Creating /usr/local/bin links."
- mkdir -p /usr/local/bin
- for link in gcc gdb make mkdirs ; do
- ln -s /NextDeveloper/bin/$link /usr/local/bin/$link 2>/dev/null
- if [ 0 != $? ]; then
- echo "You already have a /usr/local/bin/$link."
- fi
- done
- fi
-
- if [ xYES = x$PDO_CREATE_LIBPDO_LINK ]; then
- rm -f /usr/lib/libpdo.so
- ln -s /NextDeveloper/lib/libpdo.so /usr/lib
- fi
-
- # Start the services
- if [ xYES = x$PDO_START_DAEMONS ]; then
- $PSALL | $GREPQUIETLY -v grep | $GREPQUIETLY machd
- if [ 0 != $? ]; then
- /NextDeveloper/etc/NeXTpdo start
- else
- echo "PDO services are already running."
- fi
- fi
-
-
- # Fix the headers
- if [ xYES = x$PDO_RUN_FIXINCLUDES ]; then
- echo "Fixing header files."
- $PDO_INSTALL_DIR/NextDeveloper/etc/fixincludes
- fi
-
- if [ xYES = x$PDO_INSTALL_WOUSER ]; then
- echo "WebObjects is now installed."
- elif [ xYES = x$PDO_INSTALL_EOUSER ]; then
- echo "PDO and EOF are now installed."
- else
- echo "PDO is now installed."
- fi
-
- exit 0
-
-