@@ -1,230252 +0,0 @@
-#!/bin/sh
-PATH=/usr/bin:/bin
-umask 022
-
-release_comp() {
- if [ "$1" = "$2" ] ; then
- echo "eq"
- else
- lrel=`printf "%s\n%s\n" $1 $2 | \
- sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n | \
- head -1`
- if [ "$1" = "${lrel}" ]; then
- echo "lt"
- else
- echo "gt"
- fi
- fi
-}
-
-
-agree() {
- while [ "true" ]; do
- read reply leftover
- case $reply in
- [yY] | [yY][eE][sS])
- echo "yes"
- return 0
- ;;
- [nN] | [nN][oO])
- echo "no"
- return 0
- ;;
- esac
- done
-}
-
-
-install_JavaDB() {
- to_be_upgraded="sun-javadb-common-10.3.1-4.1.i386.rpm sun-javadb-core-10.3.1-4.1.i386.rpm sun-javadb-client-10.3.1-4.1.i386.rpm sun-javadb-demo-10.3.1-4.1.i386.rpm sun-javadb-docs-10.3.1-4.1.i386.rpm sun-javadb-javadoc-10.3.1-4.1.i386.rpm "
- rpm_flags="-ihv"
- installed_version=`rpm -q --queryformat '%{VERSION}.%{RELEASE}' sun-javadb-common`
- if [ $? = 0 ] && [ ! -z ${installed_version} ] ; then
- case `release_comp ${installed_version} '10.3.1.4.1'` in
- "lt" )
- printf "\nJava DB version %s is currently installed.\n" \
- ${installed_version}
- printf "Upgrade to version 10.3.1.4.1 ? [yes,no]\n"
- if [ "`agree`" = "no" ] ; then
- printf "Java DB not updated\n"
- return 0
- fi
- rpm_flags="-Uvh"
- ;;
- "eq" )
- to_be_upgraded=""
- for i in sun-javadb-common-10.3.1-4.1.i386.rpm sun-javadb-core-10.3.1-4.1.i386.rpm sun-javadb-client-10.3.1-4.1.i386.rpm sun-javadb-demo-10.3.1-4.1.i386.rpm sun-javadb-docs-10.3.1-4.1.i386.rpm sun-javadb-javadoc-10.3.1-4.1.i386.rpm ; do
- rpm_name=`echo $i | sed -e "s/-10.3.1.4.1.*//"`
- rpm -q ${rpm_name} >/dev/null 2>&1
- if [ "$?" != 0 ] ; then # Not installed
- to_be_upgraded="${to_be_upgraded} $i"
- fi
- done
- if [ -z "${to_be_upgraded}" ] ; then
- return 0
- fi
- rpm_flags="-Uvh"
- ;;
- "gt" )
- printf "Newer Java DB version (%s) is already installed.\n" \
- ${installed_version}
- return 0
- ;;
- * )
- return 1
- ;;
- esac
- fi
-
- # Historical packages part of the sun-javadb "group" which may be on the
- # system and have a version dependency on the sun-javadb-common package
- # but will not be removed or updated. If present, dependencies can not
- # be checked.
- rpm -q sun-javadb-usr >/dev/null 2>&1
- if [ "$?" = 0 ] ; then
- rpm_flags="${rpm_flags} --nodeps"
- else
- rpm -q sun-javadb-derby2javadblnk >/dev/null 2>&1
- if [ "$?" = 0 ] ; then
- rpm_flags="${rpm_flags} --nodeps"
- fi
- fi
-
- printf "Installing JavaDB\n"
- rpm ${rpm_flags} ${to_be_upgraded}
- return 0
-}
-
-
-register_JDK() {
- javaprefix="$1"
- source="$2"
- noregister="$3"
- if [ -x "$javaprefix/bin/java" ] ; then
- register_option=""
- if [ "$noregister" != "-noregister" ] ; then
- register_option="-register"
- more <<"EOF"
-
-Java(TM) SE Development Kit 6 successfully installed.
-
-Product Registration is FREE and includes many benefits:
-* Notification of new versions, patches, and updates
-* Special offers on Sun products, services and training
-* Access to early releases and documentation
-
-Product and system data will be collected. If your configuration
-supports a browser, the Sun Product Registration form for
-the JDK will be presented. If you do not register, none of
-this information will be saved. You may also register your
-JDK later by opening the register.html file (located in
-the JDK installation directory) in a browser.
-
-For more information on what data Registration collects and
-how it is managed and used, see:
-http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html
-
-EOF
- printf "Press Enter to continue.....\n"
- read reply leftover
- fi
- "$javaprefix/bin/java" com.sun.servicetag.Installer \
- -source "$source" "$register_option" > /dev/null 2>&1
- fi
- return 0
-}
-
-javahome=jdk1.6.0_06
-platform=linux
-PACKED_JARS=""
-ARCH=64
-BINARY_NAME=temp.bin
-RPM_NAME=jdk-6u6-linux-amd64.rpm
-RPM_JAVA_PREFIX=/usr/java/jdk1.6.0_06
-diskSpaceRequired=165826
-more <<"EOF"
-Sun Microsystems, Inc. Binary Code License Agreement
-
-for the JAVA SE DEVELOPMENT KIT (JDK), VERSION 6
-
-SUN MICROSYSTEMS, INC. ("SUN") IS WILLING TO LICENSE THE
-SOFTWARE IDENTIFIED BELOW TO YOU ONLY UPON THE CONDITION
-THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS BINARY
-CODE LICENSE AGREEMENT AND SUPPLEMENTAL LICENSE TERMS
-(COLLECTIVELY "AGREEMENT"). PLEASE READ THE AGREEMENT
-CAREFULLY. BY DOWNLOADING OR INSTALLING THIS SOFTWARE, YOU
-ACCEPT THE TERMS OF THE AGREEMENT. INDICATE ACCEPTANCE BY
-SELECTING THE "ACCEPT" BUTTON AT THE BOTTOM OF THE
-AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY ALL THE
-TERMS, SELECT THE "DECLINE" BUTTON AT THE BOTTOM OF THE
-AGREEMENT AND THE DOWNLOAD OR INSTALL PROCESS WILL NOT
-CONTINUE.
-
-1. DEFINITIONS. "Software" means the identified above in
-binary form, any other machine readable materials
-(including, but not limited to, libraries, source files,
-header files, and data files), any updates or error
-corrections provided by Sun, and any user manuals,
-programming guides and other documentation provided to you
-by Sun under this Agreement. "General Purpose Desktop
-Computers and Servers" means computers, including desktop,
-laptop and tablet computers, or servers, used for general
-computing functions under end user control (such as but not
-specifically limited to email, general purpose Internet
-browsing, and office suite productivity tools).
-The use of Software in systems and solutions that provide
-dedicated functionality (other than as mentioned above) or
-designed for use in embedded or function-specific software
-applications, for example but not limited to: Software
-embedded in or bundled with industrial control systems,
-wireless mobile telephones, wireless handheld devices,
-kiosks, TV/STB, Blu-ray Disc devices, telematics and
-network control switching equipment, printers and storage
-management systems, and other related systems are excluded
-from this definition and not licensed under this
-Agreement. "Programs" means Java technology applets and
-applications intended to run on the Java Platform Standard
-Edition (Java SE) platform on Java-enabled General Purpose
-Desktop Computers and Servers.
-
-2. LICENSE TO USE. Subject to the terms and conditions of
-this Agreement, including, but not limited to the Java
-Technology Restrictions of the Supplemental License Terms,
-Sun grants you a non-exclusive, non-transferable, limited
-license without license fees to reproduce and use
-internally Software complete and unmodified for the sole
-purpose of running Programs. Additional licenses for
-developers and/or publishers are granted in the
-Supplemental License Terms.
-
|