source: oracle-java7-installer/trunk/fuentes/debian/oracle-java7-installer.config @ 624

Last change on this file since 624 was 624, checked in by jrpelegrina, 4 years ago

First release to xenial

File size: 3.3 KB
Line 
1#!/bin/sh
2
3set -e
4
5. /usr/share/debconf/confmodule
6
7
8### Variables
9VER='0.7'
10
11# Folders
12J_INSTALL_DIR=/usr/lib/jvm/java-7-oracle
13OLDDIR=/usr/lib/oracle-jdk7-installer-unpackdir
14NEWDIR=/var/cache/oracle-jdk7-installer
15
16# Filenames and checksums
17case $(dpkg --print-architecture) in
18'i386'|'i586'|'i686')
19        arch=i386; dld=i586
20        # Must be modified for each release
21        SHA256SUM_TGZ="9ded1318a7223cf6e09ac4b6ee4db1f4c5d1aef1d3d291f6db8491a32eaa57ba"
22        ;;
23'amd64')
24        arch=amd64; dld=x64
25        # Must be modified for each release
26        SHA256SUM_TGZ="bad9a731639655118740bee119139c1ed019737ec802a630dd7ad7aab4309623"
27        ;;
28arm*)
29        arch=arm
30        if [ `uname -m` = "armv7l" ] || [ `uname -m` = "armv6l" ]; then
31                if [ -x /usr/bin/readelf ] ; then
32                        HARDFLOAT=`readelf -A /proc/self/exe | grep Tag_ABI_VFP_args`
33                        if [ -z "$HARDFLOAT" ]; then
34                                # Softfloat
35                                dld='arm-vfp-sflt'
36                                # Must be modified for each release
37                                SHA256SUM_TGZ="e9586d8605954a10c028a260fddd91e6ec09395cd797d7b0a307d4a668d7b0cf"
38                        else
39                                # Hardfloat
40                                dld='arm-vfp-hflt'
41                                # Must be modified for each release
42                                SHA256SUM_TGZ="71968c9893310a9338f4434257c1a188d41080335105bcb9b64051336d3c5fcd"
43                        fi
44                fi
45        else
46                echo "Oracle JDK 7 only supports ARM v6/v7."
47                arch=''
48        fi
49        ;;
50*)
51        echo "Please report to author unsupported platform '`uname -m`'.";
52        echo "Proceeding without web browser plugin support";
53        arch='';
54esac
55
56if [ ! $arch = "arm" ]; then
57        JAVA_VERSION=7u80 # Must be modified for each release!!!
58        J_DIR=jdk1.7.0_80 # Must be modified for each release!!!
59        FILENAME=jdk-${JAVA_VERSION}-linux-${dld}.tar.gz
60        PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/7u80-b15/$FILENAME # Must be modified for each release!!!
61        for JAVA_VERSION_OLD in `seq 1 79`; do #must be modified for each release ("1 3" for 7u4; "1 4" for 7u5, etc)
62                FILENAMES_OLD="jdk-7u${JAVA_VERSION_OLD}-linux-${dld}.tar.gz $FILENAMES_OLD"
63        done
64else
65# Must be modified for each release!!!
66        JAVA_VERSION=7u60 # Must be modified for each release!!!
67        J_DIR=jdk1.7.0_60 # 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/7u60-b19/$FILENAME # Must be modified for each release!!!
70        for JAVA_VERSION_OLD in `seq 1 59`; do #must be modified for each release ("1 3" for 7u4; "1 4" for 7u5, etc)
71                FILENAMES_OLD="jdk-7u${JAVA_VERSION_OLD}-linux-${dld}.tar.gz $FILENAMES_OLD"
72        done
73fi
74
75db_get oracle-java7-installer/local
76echo "$SHA256SUM_TGZ  $RET/$FILENAME" \
77| sha256sum -c > /dev/null 2>&1 \
78|| db_set oracle-java7-installer/local /var/cache/oracle-jdk7-installer
79
80db_get oracle-java7-installer/local
81echo "$SHA256SUM_TGZ  $RET/$FILENAME" \
82| sha256sum -c > /dev/null 2>&1 \
83|| db_set oracle-java7-installer/local /usr/lib/oracle-jdk7-installer-unpackdir
84
85db_get oracle-java7-installer/local
86echo "$SHA256SUM_TGZ  $RET/$FILENAME" \
87| sha256sum -c > /dev/null 2>&1 \
88|| db_reset oracle-java7-installer/local
89
90while true; do
91    db_input medium oracle-java7-installer/local || true
92    db_go
93    db_get oracle-java7-installer/local
94    if [ -d "$RET" -a -f "$RET"/$FILENAME ]; then
95                LOCAL="true"
96                break;
97    elif [ "x$RET" = "x" ]; then
98                break;
99    fi
100    db_reset oracle-java7-installer/not_exist || true
101    db_reset oracle-java7-installer/local || true
102    db_text medium oracle-java7-installer/not_exist || true
103    db_go
104done
105
106exit 0
Note: See TracBrowser for help on using the repository browser.