$FreeBSD$ --- bin/forrest Sun Jun 19 11:54:14 2005 +++ bin/forrest.port Thu Jun 30 14:16:09 2005 @@ -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"` @@ -72,6 +79,12 @@ FORREST_DOT_HOME=$FORREST_HOME fi +if [ -z "$DISPLAY" ]; then + JAVA_AWT_HEADLESS="-Dforrest.jvmargs=-Djava.awt.headless=true" +else + JAVA_AWT_HEADLESS='' +fi + # set the ant file to use ANTFILE="$FORREST_DOT_HOME/main/forrest.build.xml" @@ -94,7 +107,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