geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r942204 - in /geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution: unix-shell/bin/client unix-shell/bin/deploy unix-shell/bin/geronimo unix-shell/bin/karaf unix-shell/bin/setjavaenv.sh windows-text/bin/karaf.bat
Date Fri, 07 May 2010 20:22:00 GMT
Author: gawor
Date: Fri May  7 20:22:00 2010
New Revision: 942204

URL: http://svn.apache.org/viewvc?rev=942204&view=rev
Log:
remove karaf scripts and update unix scripts to work without JAVA_HOME or JRE_HOME set

Removed:
    geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/karaf
    geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/windows-text/bin/karaf.bat
Modified:
    geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/client
    geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/deploy
    geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo
    geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/setjavaenv.sh

Modified: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/client
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/client?rev=942204&r1=942203&r2=942204&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/client
(original)
+++ geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/client
Fri May  7 20:22:00 2010
@@ -88,9 +88,11 @@
 # OS specific support.  $var _must_ be set to either true or false.
 cygwin=false
 os400=false
+darwin=false
 case "`uname`" in
 CYGWIN*) cygwin=true;;
 OS400*) os400=true;;
+Darwin*) darwin=true;;
 esac
 
 # resolve links - $0 may be a softlink

Modified: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/deploy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/deploy?rev=942204&r1=942203&r2=942204&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/deploy
(original)
+++ geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/deploy
Fri May  7 20:22:00 2010
@@ -88,9 +88,11 @@
 # OS specific support.  $var _must_ be set to either true or false.
 cygwin=false
 os400=false
+darwin=false
 case "`uname`" in
 CYGWIN*) cygwin=true;;
 OS400*) os400=true;;
+Darwin*) darwin=true;;
 esac
 
 # resolve links - $0 may be a softlink

Modified: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo?rev=942204&r1=942203&r2=942204&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo
(original)
+++ geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/geronimo
Fri May  7 20:22:00 2010
@@ -132,9 +132,11 @@
 # OS specific support.  $var _must_ be set to either true or false.
 cygwin=false
 os400=false
+darwin=false
 case "`uname`" in
 CYGWIN*) cygwin=true;;
 OS400*) os400=true;;
+Darwin*) darwin=true;;
 esac
 
 # resolve links - $0 may be a softlink

Modified: geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/setjavaenv.sh
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/setjavaenv.sh?rev=942204&r1=942203&r2=942204&view=diff
==============================================================================
--- geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/setjavaenv.sh
(original)
+++ geronimo/server/trunk/framework/configs/karaf-framework/src/main/distribution/unix-shell/bin/setjavaenv.sh
Fri May  7 20:22:00 2010
@@ -37,19 +37,30 @@
 
 # Make sure prerequisite environment variables are set
 if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
-  __JAVA_TEST="which java"
-  if [ -n "__JAVA_TEST" ]; then
-    _RUNJAVA="java"
+  if $darwin; then
+    if [ -d "/System/Library/Frameworks/JavaVM.framework/Home" ]; then
+      export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home"
+    fi
   else
-    echo ""
-    echo "ERROR:  Could not find a Java runtime."
-    echo " - Neither the JAVA_HOME nor the JRE_HOME environment variable is defined"
-    echo " - A Java implementation could not be found on the system PATH"
-    echo "At least one of these is required for this program to execute."
-    echo ""
+    JAVA_PATH=`which java 2>/dev/null`
+    if [ "x$JAVA_PATH" != "x" ]; then
+      JAVA_PATH=`dirname $JAVA_PATH 2>/dev/null`
+      JAVA_PATH=`dirname $JAVA_PATH 2>/dev/null`
+      if [ -d "$JAVA_PATH/jre" ]; then
+        JAVA_HOME="$JAVA_PATH"
+        JRE_HOME="$JAVA_PATH/jre"
+      else
+        JRE_HOME="$JAVA_PATH"
+      fi
+    fi
+  fi
+
+  if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
+    echo "Neither the JAVA_HOME nor the JRE_HOME environment variable is defined"
+    echo "At least one of these environment variable is needed to run this program"
     exit 1
   fi
-else
+fi
 
 if [ -z "$JAVA_HOME" -a "$1" = "debug" ]; then
   echo "JAVA_HOME should point to a JDK in order to run in debug mode."
@@ -101,8 +112,7 @@ if [ ! -x "$BASEDIR"/bin/setjavaenv.sh ]
 fi
 
 # Set standard commands for invoking Java.
-  _RUNJAVA="$JRE_HOME"/bin/java
+_RUNJAVA="$JRE_HOME"/bin/java
 if [ "$os400" != "true" ]; then
   _RUNJDB="$JAVA_HOME"/bin/jdb
 fi
-fi



Mime
View raw message