#!/bin/sh set -e . /usr/share/debconf/confmodule ### Variables VER='0.7' # Folders J_INSTALL_DIR=/usr/lib/jvm/java-6-oracle OLDDIR=/usr/lib/oracle-jdk6-installer-unpackdir NEWDIR=/var/cache/oracle-jdk6-installer # Must be modified for each release JAVA_VERSION=6u45 J_DIR=jdk1.6.0_45 # Filenames and checksums case $(uname -m) in 'i686'|'i586') arch=i386; dld=i586 # Must be modified for each release SHA256SUM_TGZ="d53b5a2518d80e1d95565f0adda54eee229dc5f4a1d1a3c2f7bf5045b168a357" ;; 'x86_64') arch=amd64; dld=x64 # Must be modified for each release SHA256SUM_TGZ="6b493aeab16c940cae9e3d07ad2a5c5684fb49cf06c5d44c400c7993db0d12e8" ;; *) echo "Please report to author unsupported platform '`uname -m`'."; echo "Proceeding without web browser plugin support"; arch=''; esac FILENAME=jdk-${JAVA_VERSION}-linux-${dld}.bin for JAVA_VERSION_OLD in `seq 1 44`; do #must be modified for each release ("1 39" for 6u40; "1 40" for 6u41, etc) FILENAMES_OLD="jdk-6u${JAVA_VERSION_OLD}-linux-${dld}.bin $FILENAMES_OLD" done # Must be modified for each release!!! PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/6u45-b06/$FILENAME db_get oracle-java6-installer/local echo "$SHA256SUM_TGZ $RET/$FILENAME" \ | sha256sum -c > /dev/null 2>&1 \ || db_set oracle-java6-installer/local /var/cache/oracle-jdk6-installer db_get oracle-java6-installer/local echo "$SHA256SUM_TGZ $RET/$FILENAME" \ | sha256sum -c > /dev/null 2>&1 \ || db_set oracle-java6-installer/local /usr/lib/oracle-jdk6-installer-unpackdir db_get oracle-java6-installer/local echo "$SHA256SUM_TGZ $RET/$FILENAME" \ | sha256sum -c > /dev/null 2>&1 \ || db_reset oracle-java6-installer/local while true; do db_input medium oracle-java6-installer/local || true db_go db_get oracle-java6-installer/local if [ -d "$RET" -a -f "$RET"/$FILENAME ]; then LOCAL="true" break; elif [ "x$RET" = "x" ]; then break; fi db_reset oracle-java6-installer/not_exist || true db_reset oracle-java6-installer/local || true db_text medium oracle-java6-installer/not_exist || true db_go done exit 0