You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by mp...@apache.org on 2003/02/03 15:10:54 UTC
cvs commit: xml-forrest/src/resources/forrestbot/bin forrestbot
mpo 2003/02/03 06:10:53
Modified: src/resources/forrestbot/bin forrestbot
Log:
minor changes to the bot script to make it work in the cygwin context
Revision Changes Path
1.4 +21 -3 xml-forrest/src/resources/forrestbot/bin/forrestbot
Index: forrestbot
===================================================================
RCS file: /home/cvs/xml-forrest/src/resources/forrestbot/bin/forrestbot,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- forrestbot 28 Nov 2002 15:34:31 -0000 1.3
+++ forrestbot 3 Feb 2003 14:10:53 -0000 1.4
@@ -1,5 +1,16 @@
#!/bin/sh
+cygwin=false;
+darwin=false;
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ Darwin*) darwin=true
+ if [ -z "$JAVA_HOME" ] ; then
+ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
+ fi
+ ;;
+esac
+
# Try to determine the FORREST_HOME
if [ -z "$FORREST_HOME" ] ; then
# Note: this piece of code is based on ant's shell script
@@ -30,7 +41,12 @@
cd $saveddir
fi
-FORRESTBOT_HOME="$FORREST_HOME/forrestbot"
+if ["$cygwin" = "true"]; then
+ FORRESTBOT_HOME=`cygpath -w "$FORREST_HOME/forrestbot"`
+else
+ FORRESTBOT_HOME="$FORREST_HOME/forrestbot"
+fi
+
# set the ant file to use
ANTFILE="$FORRESTBOT_HOME/forrestbot.build.xml"
@@ -41,10 +57,12 @@
# ----- Set Up The Runtime Classpath ------------------------------------------
-if [ "$TERM" = "cygwin" ] ; then
+if [ "$cygwin" = "true" ] ; then
S=';'
+ BASEDIR=`cygpath -w "$PWD"`
else
S=':'
+ BASEDIR=$PWD
fi
CP="$CLASSPATH"
@@ -56,7 +74,7 @@
echo "Apache Forrest. Run 'forrest -projecthelp' to list options"
echo
-"$FORREST_HOME/ant/bin/ant" -buildfile "$ANTFILE" -Dbasedir="$PWD" -Dforrest.home="$FORREST_HOME" -emacs $@
+"$FORREST_HOME/ant/bin/ant" -buildfile "$ANTFILE" -Dbasedir="$BASEDIR" -Dforrest.home="$FORREST_HOME" -emacs $@
# ---- Restore Classpath
unset CLASSPATH