diff --git a/install.sh b/install.sh index f79f2f4..9727d16 100755 --- a/install.sh +++ b/install.sh @@ -1,13 +1,18 @@ #!/bin/sh # the script must be started by root or with sudo permissions +if [ "$EUID" -ne 0 ] + then echo "Please run as root." + exit +fi + # see http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html # for jdk downloads # specify the jdk -JDK='jdk1.8.0_77' -JDKFILE='jdk-8u77-linux-x64.tar.gz' -JDKPATH="http://download.oracle.com/otn-pub/java/jdk/8u77-b03/$JDKFILE" +JDK='jdk1.8.0_161' +JDKFILE='jdk-8u161-linux-x64.tar.gz' +JDKPATH="http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/$JDKFILE" # oracle request header ORACLELIC="Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" @@ -31,4 +36,4 @@ cp $BASEDIR/java.sh /etc/profile.d source ~/.bashrc # validate the installation -java -version +java -version \ No newline at end of file