source: oracle-java8-installer/trunk/fuentes/debian/oracle-java8-installer.config @ 566

Last change on this file since 566 was 566, checked in by jrpelegrina, 3 years ago

First release to xenial

File size: 4.3 KB
Line 
1#!/bin/sh
2#jinstall - Command line script to easily add new java directories to
3#'alternatives'. This sets the java as default, and you can switch your
4#default java with update-java-alternatives
5#
6#Copyright 2012 Bruce.Ingalls at gmail & Alin Andrei <webupd8@gmail.com>
7#GPL v3 Affero license at http://www.gnu.org/
8#Downloads & discussion at http://www.webupd8.org/
9#Tested on Ubuntu Oneiric; should require few changes for other modern Unix systems
10#Currently tested only with JDK, not JRE.
11# Not fully internationalized, including japanese man pages
12
13set -e
14
15VER='0.6alpha'
16
17case $(dpkg --print-architecture) in
18'i386'|'i586'|'i686') arch=i386; dld=i586;
19  SHA256SUM_TGZ="21026a8d789f479d3905a4ead0c97fd5190aa9b4d1bfc66413e9136513ca84a2" #must be modified for each release
20  ;;
21'amd64'  ) arch=amd64; dld=x64;
22  SHA256SUM_TGZ="7e95ad5fa1c75bc65d54aaac9e9986063d0a442f39a53f77909b044cef63dc0a" #must be modified for each release
23  ;;
24arm*      )
25  arch=arm
26        if [ `uname -m` = "armv7l" ] || [ `uname -m` = "armv6l" ]; then
27                if [ -x /usr/bin/readelf ] ; then
28                        HARDFLOAT=`readelf -A /proc/self/exe | grep Tag_ABI_VFP_args`
29                        if [ -z "$HARDFLOAT" ]; then
30                                # Softfloat
31                                echo "Oracle Java 8 doesn't support ARM v6/v7 softfloat ABI."
32                                #dld='arm-vfp-sflt'
33                                #SHA256SUM_TGZ="5026a8f2eea8d350ea6ed7cfb8496b571ec9c1e43db82750a3ca8dc02569076e"
34                        else
35                                # Hardfloat
36                                dld='arm32-vfp-hflt'
37                                SHA256SUM_TGZ="35855580355584865bade416d23cc164792d7fa2581a140e6034724c520be45c" #must be modified for each release
38                        fi
39                fi
40        elif [ `uname -m` = "armv8l" ] || [ `uname -m` = "arm64" ] || [ `uname -m` = "aarch64" ]; then
41                dld='arm64-vfp-hflt'
42                SHA256SUM_TGZ="29ead39d88c2fbf5eebf126ded24c2a129227a3ae9f255f1b5688a2403912527" #must be modified for each release
43        else
44                echo "Oracle JDK 8 only supports ARM v6/v7/v8 hardfloat."
45                arch=''
46        fi
47        ;;
48*         )
49    echo "Please report to author unsupported platform '`uname -m`'.";
50    echo "Proceeding without web browser plugin support";
51    arch='';
52esac
53
54
55########Variables
56
57if [ ! $arch = "arm" ]; then
58        JAVA_VERSION=8u66 #must be modified for each release jdk-8u5-linux-x64.tar.gz
59        J_DIR=jdk1.8.0_66 #must be modified for each release
60        FILENAME=jdk-${JAVA_VERSION}-linux-${dld}.tar.gz
61        PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u66-b17/$FILENAME #must be modified for each release
62        for JAVA_VERSION_OLD2 in `seq 1 65`; do #must be modified for each release
63           FILENAMES_OLD2="jdk-8u${JAVA_VERSION_OLD2}-linux-${dld}*.tar.gz $FILENAMES_OLD2"
64        done
65else
66        JAVA_VERSION=8u65 #must be modified for each release jdk-8-linux-arm-vfp-hflt.tar.gz
67        J_DIR=jdk1.8.0_65 #must be modified for each release
68        FILENAME=jdk-${JAVA_VERSION}-linux-${dld}.tar.gz
69        PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u65-b17/$FILENAME #must be modified for each release
70        for JAVA_VERSION_OLD1 in `seq 1 64`; do #must be modified for each release
71                FILENAMES_OLD1="jdk-8u${JAVA_VERSION_OLD1}-linux-${dld}*.tar.gz $FILENAMES_OLD1 jdk-8-*.tar.gz"
72        done
73fi
74
75for JAVA_VERSION_OLD in `seq 53 132`; do #must be modified for each release
76  FILENAMES_OLD="jdk-8-ea-bin-b${JAVA_VERSION_OLD}-linux-${dld}-*.tar.gz $FILENAMES_OLD" #old name
77  FILENAMES_OLD_N="jdk-8-fcs-bin-b${JAVA_VERSION_OLD}-linux-${dld}*.tar.gz $FILENAMES_OLD_N" #new name
78  FILENAMES_OLD_NA="jdk-8-fcs-b${JAVA_VERSION_OLD}-linux-${dld}*.tar.gz $FILENAMES_OLD_NA" #arm
79done
80
81J_INSTALL_DIR=/usr/lib/jvm/java-8-oracle
82
83. /usr/share/debconf/confmodule
84
85db_get oracle-java8-installer/local
86echo "$SHA256SUM_TGZ  $RET/$FILENAME" \
87| sha256sum -c > /dev/null 2>&1 \
88|| db_set oracle-java8-installer/local /var/cache/oracle-jdk8-installer
89
90db_get oracle-java8-installer/local
91echo "$SHA256SUM_TGZ  $RET/$FILENAME" \
92| sha256sum -c > /dev/null 2>&1 \
93|| db_set oracle-java8-installer/local /usr/lib/oracle-jdk8-installer-unpackdir
94
95db_get oracle-java8-installer/local
96echo "$SHA256SUM_TGZ  $RET/$FILENAME" \
97| sha256sum -c > /dev/null 2>&1 \
98|| db_reset oracle-java8-installer/local
99
100while true; do
101    db_input medium oracle-java8-installer/local || true
102    db_go
103    db_get oracle-java8-installer/local
104    if [ -d "$RET" -a -f "$RET"/$FILENAME ]; then
105                LOCAL="true"
106                break;
107    elif [ "x$RET" = "x" ]; then
108                break;
109    fi
110    db_reset oracle-java8-installer/not_exist || true
111    db_reset oracle-java8-installer/local || true
112    db_text medium oracle-java8-installer/not_exist || true
113    db_go
114done
115
116exit 0
Note: See TracBrowser for help on using the repository browser.