brondsem | 2 Aug 2004 05:41
Picon
Favicon

svn commit: rev 35553 - forrest/trunk/src/core/bin

Author: brondsem
Date: Sun Aug  1 18:10:06 2004
New Revision: 35553

Modified:
   forrest/trunk/src/core/bin/forrest
Log:
invoking forrest works from symlink and regular file

Modified: forrest/trunk/src/core/bin/forrest
==============================================================================
--- forrest/trunk/src/core/bin/forrest	(original)
+++ forrest/trunk/src/core/bin/forrest	Sun Aug  1 18:10:06 2004
 <at>  <at>  -35,8 +35,9  <at>  <at> 
 fi

 # use the location of this script to infer $FORREST_HOME
-realpath_listing=$(ls $0)
-realpath="${realpath_listing#*-> }"
+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"`/..

 # Save old ANT_HOME


Gmane