#!/bin/sh #jinstall - Command line script to easily add new java directories to #'alternatives'. This sets the java as default, and you can switch your #default java with update-java-alternatives # #Copyright 2012 Bruce.Ingalls at gmail & Alin Andrei #GPL v3 Affero license at http://www.gnu.org/ #Downloads & discussion at http://www.webupd8.org/ #Tested on Ubuntu Oneiric; should require few changes for other modern Unix systems #Currently tested only with JDK, not JRE. # Not fully internationalized, including japanese man pages set -e VER='0.6alpha' . /usr/share/debconf/confmodule db_get oracle-java9-installer/local echo "$SHA256SUM_TGZ $RET/$FILENAME" \ | sha256sum -c > /dev/null 2>&1 \ || db_set oracle-java9-installer/local /var/cache/oracle-jdk9-x64-installer db_get oracle-java9-installer/local echo "$SHA256SUM_TGZ $RET/$FILENAME" \ | sha256sum -c > /dev/null 2>&1 \ || db_set oracle-java9-installer/local /usr/lib/oracle-jdk9-x64-installer-unpackdir db_get oracle-java9-installer/local echo "$SHA256SUM_TGZ $RET/$FILENAME" \ | sha256sum -c > /dev/null 2>&1 \ || db_reset oracle-java9-installer/local while true; do db_input medium oracle-java9-installer/local || true db_go db_get oracle-java9-installer/local if [ -d "$RET" -a -f "$RET"/$FILENAME ]; then LOCAL="true" break; elif [ "x$RET" = "x" ]; then break; fi db_reset oracle-java9-installer/not_exist || true db_reset oracle-java9-installer/local || true db_text medium oracle-java9-installer/not_exist || true db_go done exit 0