You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whirr.apache.org by kv...@apache.org on 2012/03/20 11:25:22 UTC

svn commit: r1302825 - in /whirr/branches/branch-0.7: CHANGES.txt core/src/main/resources/functions/install_oracle_jdk6.sh core/src/main/resources/functions/install_oracle_jdk7.sh

Author: kve
Date: Tue Mar 20 10:25:21 2012
New Revision: 1302825

URL: http://svn.apache.org/viewvc?rev=1302825&view=rev
Log:
WHIRR-555: Fix java install scripts: $(...) -> `...`


Modified:
    whirr/branches/branch-0.7/CHANGES.txt
    whirr/branches/branch-0.7/core/src/main/resources/functions/install_oracle_jdk6.sh
    whirr/branches/branch-0.7/core/src/main/resources/functions/install_oracle_jdk7.sh

Modified: whirr/branches/branch-0.7/CHANGES.txt
URL: http://svn.apache.org/viewvc/whirr/branches/branch-0.7/CHANGES.txt?rev=1302825&r1=1302824&r2=1302825&view=diff
==============================================================================
--- whirr/branches/branch-0.7/CHANGES.txt (original)
+++ whirr/branches/branch-0.7/CHANGES.txt Tue Mar 20 10:25:21 2012
@@ -31,6 +31,8 @@ Release 0.7.1 - 2012-02-23
 
   IMPROVEMENTS
 
+    WHIRR-555. Fix java install scripts: $(...) -> `...` (kve)
+
     WHIRR-507. Make whirr script executable from any path 
     (Marco Didonna via asavu)
 

Modified: whirr/branches/branch-0.7/core/src/main/resources/functions/install_oracle_jdk6.sh
URL: http://svn.apache.org/viewvc/whirr/branches/branch-0.7/core/src/main/resources/functions/install_oracle_jdk6.sh?rev=1302825&r1=1302824&r2=1302825&view=diff
==============================================================================
--- whirr/branches/branch-0.7/core/src/main/resources/functions/install_oracle_jdk6.sh (original)
+++ whirr/branches/branch-0.7/core/src/main/resources/functions/install_oracle_jdk6.sh Tue Mar 20 10:25:21 2012
@@ -26,7 +26,7 @@ function install_oracle_jdk6() {
     re$turn
   fi
 
-  arch=$(uname -m)
+  arch=`uname -m`
 
   # Find out which .bin file to download
   url=http://download.oracle.com/otn-pub/java/jdk/6u31-b04/jdk-6u31-linux-i586.bin
@@ -34,11 +34,11 @@ function install_oracle_jdk6() {
     url=http://download.oracle.com/otn-pub/java/jdk/6u31-b04/jdk-6u31-linux-x64.bin
   fi
   
-  tmpdir=$(mktemp -d)
-  curl $url -L --silent --show-error --fail --connect-timeout 10 --max-time 600 --retry 5 -o $tmpdir/$(basename $url)
+  tmpdir=`mktemp -d`
+  curl $url -L --silent --show-error --fail --connect-timeout 60 --max-time 600 --retry 5 -o $tmpdir/`basename $url`
 
-  (cd $tmpdir; sh $(basename $url) -noregister)
-  mkdir -p $(dirname $target_dir)
+  (cd $tmpdir; sh `basename $url` -noregister)
+  mkdir -p `dirname $target_dir`
   (cd $tmpdir; mv jdk1* $target_dir)
   rm -rf $tmpdir
   
@@ -61,6 +61,9 @@ function install_oracle_jdk6() {
   if [ -f /etc/bashrc ]; then
     echo export JAVA_HOME=$JAVA_HOME >> /etc/bashrc
   fi
+  if [ -f ~root/.bashrc ]; then
+    echo export JAVA_HOME=$JAVA_HOME >> ~root/.bashrc
+  fi
   if [ -f /etc/skel/.bashrc ]; then
     echo export JAVA_HOME=$JAVA_HOME >> /etc/skel/.bashrc
   fi

Modified: whirr/branches/branch-0.7/core/src/main/resources/functions/install_oracle_jdk7.sh
URL: http://svn.apache.org/viewvc/whirr/branches/branch-0.7/core/src/main/resources/functions/install_oracle_jdk7.sh?rev=1302825&r1=1302824&r2=1302825&view=diff
==============================================================================
--- whirr/branches/branch-0.7/core/src/main/resources/functions/install_oracle_jdk7.sh (original)
+++ whirr/branches/branch-0.7/core/src/main/resources/functions/install_oracle_jdk7.sh Tue Mar 20 10:25:21 2012
@@ -26,7 +26,7 @@ function install_oracle_jdk7() {
     re$turn
   fi
 
-  arch=$(uname -m)
+  arch=`uname -m`
 
   # Find out which tarball to download
   url=http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-i586.tar.gz
@@ -34,11 +34,11 @@ function install_oracle_jdk7() {
     url=http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.tar.gz
   fi
   
-  tmpdir=$(mktemp -d)
-  curl $url -L --silent --show-error --fail --connect-timeout 10 --max-time 600 --retry 5 -o $tmpdir/$(basename $url)
+  tmpdir=`mktemp -d`
+  curl $url -L --silent --show-error --fail --connect-timeout 60 --max-time 600 --retry 5 -o $tmpdir/`basename $url`
 
-  (cd $tmpdir; tar xzf $(basename $url))
-  mkdir -p $(dirname $target_dir)
+  (cd $tmpdir; tar xzf `basename $url`)
+  mkdir -p `dirname $target_dir`
   (cd $tmpdir; mv jdk1* $target_dir)
   rm -rf $tmpdir
   
@@ -61,6 +61,9 @@ function install_oracle_jdk7() {
   if [ -f /etc/bashrc ]; then
     echo export JAVA_HOME=$JAVA_HOME >> /etc/bashrc
   fi
+  if [ -f ~root/.bashrc ]; then
+    echo export JAVA_HOME=$JAVA_HOME >> ~root/.bashrc
+  fi
   if [ -f /etc/skel/.bashrc ]; then
     echo export JAVA_HOME=$JAVA_HOME >> /etc/skel/.bashrc
   fi