head	1.2;
access;
symbols
	RELEASE_5_4_0:1.1
	RELEASE_4_11_0:1.1
	RELEASE_5_3_0:1.1;
locks; strict;
comment	@# @;


1.2
date	2005.07.06.15.43.59;	author hq;	state dead;
branches;
next	1.1;

1.1
date	2004.05.23.19.24.21;	author thierry;	state Exp;
branches;
next	;


desc
@@


1.2
log
@- Update to 0.7
- Add 'java' category

PR:		83012
Submitted by:	maintainer
@
text
@--- src/resources/forrest-shbat/bin/forrest	Sun Oct  5 16:48:21 2003
+++ src/resources/forrest-shbat/bin/forrest.port	Tue Oct 14 15:50:00 2003
@@@@ -4,6 +4,8 @@@@
 
 cygwin=false;
 darwin=false;
+freebsd=false;
+
 case "`uname`" in
   CYGWIN*) cygwin=true ;;
   Darwin*) darwin=true
@@@@ -11,7 +13,13 @@@@
              JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home   
            fi
            ;;
+  FreeBSD*) freebsd=true
+	    if [ -z "$JAVA_HOME" ] ; then
+	      JAVA_HOME=%%JAVA_HOME%%
+	    fi
+	    ;;
 esac
+export JAVA_HOME
 
 if [ "$cygwin" = "true" ] ; then
   PROJECT_HOME=`cygpath -w "$PWD"`
@@@@ -19,9 +27,37 @@@@
   PROJECT_HOME=`pwd`
 fi
 
-# use the location of this script to infer $FORREST_HOME
-FORREST_HOME=`dirname "$0"`/..
+# Try to determine the FORREST_HOME
+if [ -z "$FORREST_HOME" ] ; then
+  # Note: this piece of code is based on ant's shell script
+
+  ## resolve links - $0 may be a link to ant's home
+  PRG=$0
+  progname=`basename $0`
+  saveddir=`pwd`
+
+  # need this for relative symlinks
+  cd `dirname $PRG`
+
+  while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '.*/.*' > /dev/null; then
+  PRG="$link"
+    else
+  PRG="`dirname $PRG`/$link"
+    fi
+  done
 
+  FORREST_HOME=`dirname "$PRG"`/..
+
+  # make it fully qualified
+  FORREST_HOME=`cd "$FORREST_HOME" && pwd`
+
+  cd $saveddir
+fi
+export FORREST_HOME
+  						
 # Save old ANT_HOME
 OLD_ANT_HOME="$ANT_HOME"
 unset ANT_HOME
@


1.1
log
@Add apache-forrest 0.5.1, a tool for rapid development of small
sites.

PR:		58015
Submitted by:	Nicola Vitale
@
text
@@

