Last active
August 20, 2018 02:41
-
-
Save poldz123/3f8e9b4f1d218e5fc011d10f9c85c145 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adds the java repository, repo, keys and update the apt. This also append the repo urls to | |
# the sources file and making sure that we do not append same deb and deb source | |
# all over again when running the installation. | |
DEB="deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | |
DEB_SOURCE="deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | |
apt-key adv --recv-key --keyserver keyserver.ubuntu.com EEA14886 | |
grep -q -F "$DEB" /etc/apt/sources.list || echo "$DEB" >> /etc/apt/sources.list | |
grep -q -F "$DEB_SOURCE" /etc/apt/sources.list || echo "$DEB_SOURCE" >> /etc/apt/sources.list | |
apt-get update | |
# Install the java8 installer and make sure that we respond to the prompt | |
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections | |
apt-get -y install oracle-java8-installer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment