You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by br...@apache.org on 2004/07/30 22:37:59 UTC

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

Author: brondsem
Date: Fri Jul 30 13:37:58 2004
New Revision: 31002

Modified:
   forrest/trunk/src/core/bin/forrest
Log:
allow forrest to be executed via a symlink

Modified: forrest/trunk/src/core/bin/forrest
==============================================================================
--- forrest/trunk/src/core/bin/forrest	(original)
+++ forrest/trunk/src/core/bin/forrest	Fri Jul 30 13:37:58 2004
@@ -35,7 +35,9 @@
 fi
 
 # use the location of this script to infer $FORREST_HOME
-FORREST_HOME=`dirname "$0"`/..
+realpath_listing=$(ls -l $0)
+realpath="${realpath_listing#*-> }"
+FORREST_HOME=`dirname "$realpath"`/..
 
 # Save old ANT_HOME
 OLD_ANT_HOME="$ANT_HOME"

Re: svn commit: rev 31002 - forrest/trunk/src/core/bin

Posted by Dave Brondsema <da...@brondsema.net>.
Diwaker Gupta wrote:
> Actually all you need to do is change this line in the forrest script:
> 
> realpath_listing=$(ls -l $0) # line 38
> 
> to
> 
> realpath_listing=$(ls $0)
> 
> That fixes the problem. Reverting back is not helpful because this
> change was made so that forrest could be run via a symlink.
> 

Well that doesn't work for symlinks anymore.  I'll work on a solution 
that works for both symlinks and regular.

> On Sat, 31 Jul 2004 00:03:35 +0200, Thorsten Scherler
> <th...@apache.org> wrote:
> 
>>After this I got:
>>/opt/apache/forrest/src/core/bin/forrest: line 78: -rwxr-xr-x    1
>>thorsten users        2174 2004-07-30 23:30
>>/opt/apache/forrest/src/core/bin/../../../tools/ant/bin/ant: No existe
>>el fichero o el directorio
>>
>>If I reverse the changes everything is alright! BTW this time I made a
>>build after update ;-)
>>
>>Can you have look? TIA
>>
>>King regards
>>thorsten
>>


-- 
Dave Brondsema : dave@brondsema.net
http://www.splike.com : programming
http://csx.calvin.edu : student org
http://www.brondsema.net : personal

Re: svn commit: rev 31002 - forrest/trunk/src/core/bin

Posted by Diwaker Gupta <di...@gmail.com>.
Actually all you need to do is change this line in the forrest script:

realpath_listing=$(ls -l $0) # line 38

to

realpath_listing=$(ls $0)

That fixes the problem. Reverting back is not helpful because this
change was made so that forrest could be run via a symlink.

On Sat, 31 Jul 2004 00:03:35 +0200, Thorsten Scherler
<th...@apache.org> wrote:
> After this I got:
> /opt/apache/forrest/src/core/bin/forrest: line 78: -rwxr-xr-x    1
> thorsten users        2174 2004-07-30 23:30
> /opt/apache/forrest/src/core/bin/../../../tools/ant/bin/ant: No existe
> el fichero o el directorio
> 
> If I reverse the changes everything is alright! BTW this time I made a
> build after update ;-)
> 
> Can you have look? TIA
> 
> King regards
> thorsten
> 
> brondsem@apache.org wrote:
> > Author: brondsem
> > Date: Fri Jul 30 13:37:58 2004
> > New Revision: 31002
> >
> > Modified:
> >    forrest/trunk/src/core/bin/forrest
> > Log:
> > allow forrest to be executed via a symlink
> >
> > Modified: forrest/trunk/src/core/bin/forrest
> > ==============================================================================
> > --- forrest/trunk/src/core/bin/forrest        (original)
> > +++ forrest/trunk/src/core/bin/forrest        Fri Jul 30 13:37:58 2004
> > @@ -35,7 +35,9 @@
> >  fi
> >
> >  # use the location of this script to infer $FORREST_HOME
> > -FORREST_HOME=`dirname "$0"`/..
> > +realpath_listing=$(ls -l $0)
> > +realpath="${realpath_listing#*-> }"
> > +FORREST_HOME=`dirname "$realpath"`/..
> >
> >  # Save old ANT_HOME
> >  OLD_ANT_HOME="$ANT_HOME"
> >
> 
> 


-- 
Diwaker Gupta
http://resolute.ucsd.edu/diwaker

Re: svn commit: rev 31002 - forrest/trunk/src/core/bin

Posted by Thorsten Scherler <th...@apache.org>.
After this I got:
/opt/apache/forrest/src/core/bin/forrest: line 78: -rwxr-xr-x    1 
thorsten users        2174 2004-07-30 23:30 
/opt/apache/forrest/src/core/bin/../../../tools/ant/bin/ant: No existe 
el fichero o el directorio

If I reverse the changes everything is alright! BTW this time I made a 
build after update ;-)

Can you have look? TIA

King regards
thorsten

brondsem@apache.org wrote:
> Author: brondsem
> Date: Fri Jul 30 13:37:58 2004
> New Revision: 31002
> 
> Modified:
>    forrest/trunk/src/core/bin/forrest
> Log:
> allow forrest to be executed via a symlink
> 
> Modified: forrest/trunk/src/core/bin/forrest
> ==============================================================================
> --- forrest/trunk/src/core/bin/forrest	(original)
> +++ forrest/trunk/src/core/bin/forrest	Fri Jul 30 13:37:58 2004
> @@ -35,7 +35,9 @@
>  fi
>  
>  # use the location of this script to infer $FORREST_HOME
> -FORREST_HOME=`dirname "$0"`/..
> +realpath_listing=$(ls -l $0)
> +realpath="${realpath_listing#*-> }"
> +FORREST_HOME=`dirname "$realpath"`/..
>  
>  # Save old ANT_HOME
>  OLD_ANT_HOME="$ANT_HOME"
>