jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject Re: [jclouds/jclouds] Fix Java install on Ubuntu Xenial (#1045)
Date Fri, 23 Dec 2016 15:45:54 GMT
nacx commented on this pull request.



> @@ -177,7 +177,11 @@ function installOpenJDK() {
     echo reusing JAVA_HOME $JAVA_HOME
   else
     if which dpkg &> /dev/null; then
-      apt-get-update && apt-get-install openjdk-6-jdk
+      apt-get update && \
+          PACKAGE=`apt-cache search --names-only '^openjdk-.-jdk$' | sort -r | cut -d' '
-f1 | head -1` && \
+          [ ! -z "$PACKAGE" ] && \
+          DEBIAN_FRONTEND=noninteractive && \
+          {  apt-get -q -y install $PACKAGE-headless || apt-get -q -y install $PACKAGE; }

Better use the [apt-get-install](https://github.com/jclouds/jclouds/blob/master/scriptbuilder/src/main/resources/functions/setupPublicCurl.sh#L18)
alias.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1045#pullrequestreview-14314142
Mime
View raw message