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

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

First release to xenial

File size: 2.1 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# Must be modified for each release
17JAVA_VERSION=7u76
18J_DIR=jdk1.7.0_76
19
20# Filenames and checksums
21case $(dpkg --print-architecture) in
22'i386'|'i586'|'i686')
23        arch=i386; dld=i586
24        # Must be modified for each release
25        SHA256SUM_TGZ="b6231064ad2c9fbbcb099dba17b1dcf12033e922b9c24e4348b9a01e9ebaa85c"
26        ;;
27'amd64')
28        arch=amd64; dld=x64
29        # Must be modified for each release
30        SHA256SUM_TGZ="54dd1e13edf18c64941a55da9c91210b53dc5cf48f1a8f4538c863049e346335"
31        ;;
32*)
33        echo "Please report to author unsupported platform '`uname -m`'.";
34        echo "Proceeding without web browser plugin support";
35        arch='';
36esac
37FILENAME=jdk-${JAVA_VERSION}-linux-${dld}.tar.gz
38for JAVA_VERSION_OLD in `seq 1 50`; do #must be modified for each release ("1 3" for 7u4; "1 4" for 7u5, etc)
39        FILENAMES_OLD="jdk-7u${JAVA_VERSION_OLD}-linux-${dld}.tar.gz $FILENAMES_OLD"
40done
41
42# Must be modified for each release!!!
43PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/7u76-b13/$FILENAME
44
45db_get oracle-java7-installer/local
46echo "$SHA256SUM_TGZ  $RET/$FILENAME" \
47| sha256sum -c > /dev/null 2>&1 \
48|| db_set oracle-java7-installer/local /var/cache/oracle-jdk7-installer
49
50db_get oracle-java7-installer/local
51echo "$SHA256SUM_TGZ  $RET/$FILENAME" \
52| sha256sum -c > /dev/null 2>&1 \
53|| db_set oracle-java7-installer/local /usr/lib/oracle-jdk7-installer-unpackdir
54
55db_get oracle-java7-installer/local
56echo "$SHA256SUM_TGZ  $RET/$FILENAME" \
57| sha256sum -c > /dev/null 2>&1 \
58|| db_reset oracle-java7-installer/local
59
60while true; do
61    db_input medium oracle-java7-installer/local || true
62    db_go
63    db_get oracle-java7-installer/local
64    if [ -d "$RET" -a -f "$RET"/$FILENAME ]; then
65                LOCAL="true"
66                break;
67    elif [ "x$RET" = "x" ]; then
68                break;
69    fi
70    db_reset oracle-java7-installer/not_exist || true
71    db_reset oracle-java7-installer/local || true
72    db_text medium oracle-java7-installer/not_exist || true
73    db_go
74done
75
76exit 0
Note: See TracBrowser for help on using the repository browser.