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

Last change on this file since 6493 was 6493, checked in by mabarracus, 21 months ago

Package Java 8u151

File size: 2.6 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="8062f34f69dd1f1991bff517df52da606c53f5fa0d6677ceb46df30e93b53a70" #must be modified for each release
20  ;;
21'amd64'  ) arch=amd64; dld=x64;
22  SHA256SUM_TGZ="c78200ce409367b296ec39be4427f020e2c585470c4eed01021feada576f027f" #must be modified for each release
23  ;;
24*         )
25    echo "Please report to author unsupported platform '`uname -m`'.";
26    echo "Proceeding without web browser plugin support";
27    arch='';
28esac
29
30########Variables
31
32if [ ! $arch = "arm" ]; then
33        JAVA_VERSION=8u151 #must be modified for each release jdk-8u5-linux-x64.tar.gz
34        J_DIR=jdk1.8.0_151 #must be modified for each release
35        FILENAME=jdk-${JAVA_VERSION}-linux-${dld}.tar.gz
36        #PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u111-b14/$FILENAME #must be modified for each release
37        for JAVA_VERSION_OLD2 in `seq 1 150`; do #must be modified for each release
38           FILENAMES_OLD2="jdk-8u${JAVA_VERSION_OLD2}-linux-${dld}*.tar.gz $FILENAMES_OLD2"
39        done
40fi
41
42J_INSTALL_DIR=/usr/lib/jvm/java-8-oracle
43
44. /usr/share/debconf/confmodule
45
46db_get oracle-java8-installer/local
47echo "$SHA256SUM_TGZ  $RET/$FILENAME" \
48| sha256sum -c > /dev/null 2>&1 \
49|| db_set oracle-java8-installer/local /var/cache/oracle-jdk8-installer
50
51db_get oracle-java8-installer/local
52echo "$SHA256SUM_TGZ  $RET/$FILENAME" \
53| sha256sum -c > /dev/null 2>&1 \
54|| db_set oracle-java8-installer/local /usr/lib/oracle-jdk8-installer-unpackdir
55
56db_get oracle-java8-installer/local
57echo "$SHA256SUM_TGZ  $RET/$FILENAME" \
58| sha256sum -c > /dev/null 2>&1 \
59|| db_reset oracle-java8-installer/local
60
61while true; do
62    db_input medium oracle-java8-installer/local || true
63    db_go
64    db_get oracle-java8-installer/local
65    if [ -d "$RET" -a -f "$RET"/$FILENAME ]; then
66                LOCAL="true"
67                break;
68    elif [ "x$RET" = "x" ]; then
69                break;
70    fi
71    db_reset oracle-java8-installer/not_exist || true
72    db_reset oracle-java8-installer/local || true
73    db_text medium oracle-java8-installer/not_exist || true
74    db_go
75done
76
77exit 0
Note: See TracBrowser for help on using the repository browser.