mirror of https://github.com/apache/jclouds.git
Issue 891: update to support lucid
This commit is contained in:
parent
f241483913
commit
0105e869c8
|
@ -154,18 +154,22 @@ END_OF_JCLOUDS_FILE
|
|||
|
||||
function installOpenJDK() {
|
||||
if hash apt-get 2>/dev/null; then
|
||||
export pkg=openjdk-7-jdk
|
||||
apt-get-install $pkg || ( apt-get-upgrade && apt-get-install $pkg )
|
||||
export JAVA_HOME=`ls -d /usr/lib/jvm/java-7-openjdk-*|grep -v common`
|
||||
pkg=openjdk-7-jdk
|
||||
(apt-get-install $pkg || ( apt-get-upgrade && apt-get-install $pkg )) &&
|
||||
export JAVA_HOME=`ls -d /usr/lib/jvm/java-7-openjdk*|grep -v common`
|
||||
# ex. lucid where jdk 7 is not present
|
||||
export JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-6-openjdk}
|
||||
test -d $JAVA_HOME || apt-get-install openjdk-6-jdk
|
||||
elif hash yum 2>/dev/null; then
|
||||
#TODO: find a jdk7 yum repo
|
||||
export pkg=java-1.6.0-openjdk-devel
|
||||
yum --nogpgcheck -y install $pkg
|
||||
yum --nogpgcheck -y install $pkg &&
|
||||
export JAVA_HOME=`ls -d /usr/lib/jvm/java-1.6.0-openjdk-*`
|
||||
else
|
||||
abort "we only support apt-get and yum right now... please contribute!"
|
||||
return 1
|
||||
fi
|
||||
test -n "$JAVA_HOME" || abort "JDK installation failed!"
|
||||
ln -Fs $JAVA_HOME /usr/local/jdk
|
||||
/usr/local/jdk/bin/java -version || abort "cannot run java"
|
||||
setupJavaHomeInProfile
|
||||
|
|
|
@ -154,18 +154,22 @@ END_OF_JCLOUDS_FILE
|
|||
|
||||
function installOpenJDK() {
|
||||
if hash apt-get 2>/dev/null; then
|
||||
export pkg=openjdk-7-jdk
|
||||
apt-get-install $pkg || ( apt-get-upgrade && apt-get-install $pkg )
|
||||
export JAVA_HOME=`ls -d /usr/lib/jvm/java-7-openjdk-*|grep -v common`
|
||||
pkg=openjdk-7-jdk
|
||||
(apt-get-install $pkg || ( apt-get-upgrade && apt-get-install $pkg )) &&
|
||||
export JAVA_HOME=`ls -d /usr/lib/jvm/java-7-openjdk*|grep -v common`
|
||||
# ex. lucid where jdk 7 is not present
|
||||
export JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-6-openjdk}
|
||||
test -d $JAVA_HOME || apt-get-install openjdk-6-jdk
|
||||
elif hash yum 2>/dev/null; then
|
||||
#TODO: find a jdk7 yum repo
|
||||
export pkg=java-1.6.0-openjdk-devel
|
||||
yum --nogpgcheck -y install $pkg
|
||||
yum --nogpgcheck -y install $pkg &&
|
||||
export JAVA_HOME=`ls -d /usr/lib/jvm/java-1.6.0-openjdk-*`
|
||||
else
|
||||
abort "we only support apt-get and yum right now... please contribute!"
|
||||
return 1
|
||||
fi
|
||||
test -n "$JAVA_HOME" || abort "JDK installation failed!"
|
||||
ln -Fs $JAVA_HOME /usr/local/jdk
|
||||
/usr/local/jdk/bin/java -version || abort "cannot run java"
|
||||
setupJavaHomeInProfile
|
||||
|
|
|
@ -154,18 +154,22 @@ END_OF_JCLOUDS_FILE
|
|||
|
||||
function installOpenJDK() {
|
||||
if hash apt-get 2>/dev/null; then
|
||||
export pkg=openjdk-7-jdk
|
||||
apt-get-install $pkg || ( apt-get-upgrade && apt-get-install $pkg )
|
||||
export JAVA_HOME=`ls -d /usr/lib/jvm/java-7-openjdk-*|grep -v common`
|
||||
pkg=openjdk-7-jdk
|
||||
(apt-get-install $pkg || ( apt-get-upgrade && apt-get-install $pkg )) &&
|
||||
export JAVA_HOME=`ls -d /usr/lib/jvm/java-7-openjdk*|grep -v common`
|
||||
# ex. lucid where jdk 7 is not present
|
||||
export JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-6-openjdk}
|
||||
test -d $JAVA_HOME || apt-get-install openjdk-6-jdk
|
||||
elif hash yum 2>/dev/null; then
|
||||
#TODO: find a jdk7 yum repo
|
||||
export pkg=java-1.6.0-openjdk-devel
|
||||
yum --nogpgcheck -y install $pkg
|
||||
yum --nogpgcheck -y install $pkg &&
|
||||
export JAVA_HOME=`ls -d /usr/lib/jvm/java-1.6.0-openjdk-*`
|
||||
else
|
||||
abort "we only support apt-get and yum right now... please contribute!"
|
||||
return 1
|
||||
fi
|
||||
test -n "$JAVA_HOME" || abort "JDK installation failed!"
|
||||
ln -Fs $JAVA_HOME /usr/local/jdk
|
||||
/usr/local/jdk/bin/java -version || abort "cannot run java"
|
||||
setupJavaHomeInProfile
|
||||
|
|
|
@ -19,18 +19,22 @@ END_OF_JCLOUDS_FILE
|
|||
|
||||
function installOpenJDK() {
|
||||
if hash apt-get 2>/dev/null; then
|
||||
export pkg=openjdk-7-jdk
|
||||
apt-get-install $pkg || ( apt-get-upgrade && apt-get-install $pkg )
|
||||
export JAVA_HOME=`ls -d /usr/lib/jvm/java-7-openjdk-*|grep -v common`
|
||||
pkg=openjdk-7-jdk
|
||||
(apt-get-install $pkg || ( apt-get-upgrade && apt-get-install $pkg )) &&
|
||||
export JAVA_HOME=`ls -d /usr/lib/jvm/java-7-openjdk*|grep -v common`
|
||||
# ex. lucid where jdk 7 is not present
|
||||
export JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-6-openjdk}
|
||||
test -d $JAVA_HOME || apt-get-install openjdk-6-jdk
|
||||
elif hash yum 2>/dev/null; then
|
||||
#TODO: find a jdk7 yum repo
|
||||
export pkg=java-1.6.0-openjdk-devel
|
||||
yum --nogpgcheck -y install $pkg
|
||||
yum --nogpgcheck -y install $pkg &&
|
||||
export JAVA_HOME=`ls -d /usr/lib/jvm/java-1.6.0-openjdk-*`
|
||||
else
|
||||
abort "we only support apt-get and yum right now... please contribute!"
|
||||
return 1
|
||||
fi
|
||||
test -n "$JAVA_HOME" || abort "JDK installation failed!"
|
||||
ln -Fs $JAVA_HOME /usr/local/jdk
|
||||
/usr/local/jdk/bin/java -version || abort "cannot run java"
|
||||
setupJavaHomeInProfile
|
||||
|
|
|
@ -154,18 +154,22 @@ END_OF_JCLOUDS_FILE
|
|||
|
||||
function installOpenJDK() {
|
||||
if hash apt-get 2>/dev/null; then
|
||||
export pkg=openjdk-7-jdk
|
||||
apt-get-install $pkg || ( apt-get-upgrade && apt-get-install $pkg )
|
||||
export JAVA_HOME=`ls -d /usr/lib/jvm/java-7-openjdk-*|grep -v common`
|
||||
pkg=openjdk-7-jdk
|
||||
(apt-get-install $pkg || ( apt-get-upgrade && apt-get-install $pkg )) &&
|
||||
export JAVA_HOME=`ls -d /usr/lib/jvm/java-7-openjdk*|grep -v common`
|
||||
# ex. lucid where jdk 7 is not present
|
||||
export JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/java-6-openjdk}
|
||||
test -d $JAVA_HOME || apt-get-install openjdk-6-jdk
|
||||
elif hash yum 2>/dev/null; then
|
||||
#TODO: find a jdk7 yum repo
|
||||
export pkg=java-1.6.0-openjdk-devel
|
||||
yum --nogpgcheck -y install $pkg
|
||||
yum --nogpgcheck -y install $pkg &&
|
||||
export JAVA_HOME=`ls -d /usr/lib/jvm/java-1.6.0-openjdk-*`
|
||||
else
|
||||
abort "we only support apt-get and yum right now... please contribute!"
|
||||
return 1
|
||||
fi
|
||||
test -n "$JAVA_HOME" || abort "JDK installation failed!"
|
||||
ln -Fs $JAVA_HOME /usr/local/jdk
|
||||
/usr/local/jdk/bin/java -version || abort "cannot run java"
|
||||
setupJavaHomeInProfile
|
||||
|
|
Loading…
Reference in New Issue