forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cross...@apache.org
Subject svn commit: rev 36046 - forrest/trunk/src/core/bin
Date Fri, 06 Aug 2004 18:53:42 GMT
Author: crossley
Date: Fri Aug  6 11:53:42 2004
New Revision: 36046

Modified:
   forrest/trunk/src/core/bin/forrest
Log:
Only try to do fancy determination of FORREST_HOME if not already defined.


Modified: forrest/trunk/src/core/bin/forrest
==============================================================================
--- forrest/trunk/src/core/bin/forrest	(original)
+++ forrest/trunk/src/core/bin/forrest	Fri Aug  6 11:53:42 2004
@@ -19,7 +19,7 @@
 
 cygwin=false;
 darwin=false;
-case "`uname`" in
+case `uname` in
   CYGWIN*) cygwin=true ;;
   Darwin*) darwin=true
            if [ -z "$JAVA_HOME" ] ; then
@@ -34,11 +34,13 @@
   PROJECT_HOME=`pwd`
 fi
 
-# use the location of this script to infer $FORREST_HOME
-realpath_listing=$(ls -l $0)
-realpath="${realpath_listing#*-> }"     # strip everything before '-> '
-realpath="/${realpath#*/}"        # strip everything before '/' (in case there wasn't a ->)
-FORREST_HOME=`dirname "$realpath"`/..
+if [ -z "$FORREST_HOME" ] ; then
+  # use the location of this script to infer $FORREST_HOME
+  realpath_listing=$(ls -l $0)
+  realpath="${realpath_listing#*-> }" # strip everything before '-> '
+  realpath="/${realpath#*/}" # strip before '/' in case there wasn't a ->
+  FORREST_HOME=`dirname "$realpath"`/..
+fi
 
 # Save old ANT_HOME
 OLD_ANT_HOME="$ANT_HOME"

Mime
View raw message