--- bin/forrest Tue Apr 10 18:17:55 2007 +++ bin/forrest.port Mon Apr 16 14:24:52 2007 @@ -20,6 +20,7 @@ cygwin=false; darwin=false; +freebsd=false; case `uname` in CYGWIN*) cygwin=true ;; Darwin*) darwin=true @@ -27,7 +28,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"` @@ -35,6 +42,12 @@ PROJECT_HOME=`pwd` fi +if [ -z "$DISPLAY" ]; then + JAVA_AWT_HEADLESS="-Dforrest.jvmargs=-Djava.awt.headless=true" +else + JAVA_AWT_HEADLESS='' +fi + if [ -z "$FORREST_HOME" ] ; then # use the location of this script to infer $FORREST_HOME @@ -97,7 +110,7 @@ echo "Apache Forrest. Run 'forrest -projecthelp' to list options" echo export FORREST_HOME -"$ANT_HOME/bin/ant" --noconfig -buildfile "$ANTFILE" -Dbasedir="$PROJECT_HOME" -emacs "$@" +"$ANT_HOME/bin/ant" --noconfig -buildfile "$ANTFILE" -Dbasedir="$PROJECT_HOME" ${JAVA_AWT_HEADLESS} -emacs "$@" RESULT=$? # ---- Restore Classpath