#!/bin/sh set -e . /usr/share/debconf/confmodule ### Variables VER='0.7' # Folders J_INSTALL_DIR=/usr/lib/jvm/java-7-oracle OLDDIR=/usr/lib/oracle-jdk7-installer-unpackdir NEWDIR=/var/cache/oracle-jdk7-installer # Must be modified for each release JAVA_VERSION=7u76 J_DIR=jdk1.7.0_76 # Filenames and checksums case $(dpkg --print-architecture) in 'i386'|'i586'|'i686') arch=i386; dld=i586 # Must be modified for each release SHA256SUM_TGZ="b6231064ad2c9fbbcb099dba17b1dcf12033e922b9c24e4348b9a01e9ebaa85c" ;; 'amd64') arch=amd64; dld=x64 # Must be modified for each release SHA256SUM_TGZ="54dd1e13edf18c64941a55da9c91210b53dc5cf48f1a8f4538c863049e346335" ;; *) echo "Please report to author unsupported platform '`uname -m`'."; echo "Proceeding without web browser plugin support"; arch=''; esac FILENAME=jdk-${JAVA_VERSION}-linux-${dld}.tar.gz for JAVA_VERSION_OLD in `seq 1 50`; do #must be modified for each release ("1 3" for 7u4; "1 4" for 7u5, etc) FILENAMES_OLD="jdk-7u${JAVA_VERSION_OLD}-linux-${dld}.tar.gz $FILENAMES_OLD" done # Must be modified for each release!!! PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/7u76-b13/$FILENAME db_get oracle-java7-installer/local echo "$SHA256SUM_TGZ $RET/$FILENAME" \ | sha256sum -c > /dev/null 2>&1 \ || db_set oracle-java7-installer/local /var/cache/oracle-jdk7-installer db_get oracle-java7-installer/local echo "$SHA256SUM_TGZ $RET/$FILENAME" \ | sha256sum -c > /dev/null 2>&1 \ || db_set oracle-java7-installer/local /usr/lib/oracle-jdk7-installer-unpackdir db_get oracle-java7-installer/local echo "$SHA256SUM_TGZ $RET/$FILENAME" \ | sha256sum -c > /dev/null 2>&1 \ || db_reset oracle-java7-installer/local while true; do db_input medium oracle-java7-installer/local || true db_go db_get oracle-java7-installer/local if [ -d "$RET" -a -f "$RET"/$FILENAME ]; then LOCAL="true" break; elif [ "x$RET" = "x" ]; then break; fi db_reset oracle-java7-installer/not_exist || true db_reset oracle-java7-installer/local || true db_text medium oracle-java7-installer/not_exist || true db_go done exit 0