diff -Nbaur --exclude-from=/tmp/portal.excludes jboss-portal-2.0.orig/build/build.sh jboss-portal-2.0/build/build.sh --- jboss-portal-2.0.orig/build/build.sh Sat Jan 15 00:01:33 2005 +++ jboss-portal-2.0/build/build.sh Fri Feb 4 07:42:38 2005 @@ -13,37 +13,33 @@ PROGNAME=`basename $0` DIRNAME=`dirname $0` -# Buss it yo -main() { - if [ "x$TOOLS_ROOT" = "x" ]; then - TOOLS_ROOT=`cd $DIRNAME/../tools && pwd` - fi +# simple method to get the basedir +_XCWD=`pwd` +BASEDIR=`cd $DIRNAME/.. && pwd` +cd $_XCWD - MODULE_ROOT=`cd $DIRNAME; pwd` - export TOOLS_ROOT MODULE_ROOT DEBUG TRACE +if [ "x$TOOLS_ROOT" = "x" ]; then + TOOLS_ROOT="$BASEDIR/tools" +fi - # Where is the target script? - target="$TOOLS_ROOT/bin/$PROGNAME" - if [ ! -f "$target" ]; then - echo "${PROGNAME}: *ERROR* The target executable does not exist:" - echo "${PROGNAME}:" - echo "${PROGNAME}: $target" - echo "${PROGNAME}:" - echo "${PROGNAME}: Please make sure you have checked out the 'tools' module" - echo "${PROGNAME}: and make sure it is up to date." - exit 2 - fi +MODULE_ROOT=`cd $DIRNAME; pwd` +export TOOLS_ROOT MODULE_ROOT DEBUG TRACE - # Get busy yo! - if [ "x$DEBUG" != "x" ]; then - echo "${PROGNAME}: Executing: /bin/sh $target $@" - fi - if [ "x$TRACE" = "x" ]; then - exec /bin/sh $target "$@" +LOCALCLASSPATH="" +if [ -n "$CLASSPATH" ] ; then + LOCALCLASSPATH=$CLASSPATH +fi + +if [ -d "$TOOLS_ROOT/lib" ]; then + for i in $TOOLS_ROOT/lib/*.jar ; do + if [ -z "$LOCALCLASSPATH" ] ; then + LOCALCLASSPATH=$i else - exec /bin/sh -x $target "$@" + LOCALCLASSPATH="$i":$LOCALCLASSPATH fi -} + done +fi -# Lets get ready to rumble! -main "$@" +CLASSPATH=$LOCALCLASSPATH +export CLASSPATH +ant $@