diff options
author | michelou <michelou@epfl.ch> | 2005-08-31 09:27:26 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2005-08-31 09:27:26 +0000 |
commit | efcdf649975455deacebf36ad5b62cc30ab06353 (patch) | |
tree | ea233a141fd028cdcc067248c5d4f2641753886e /ant-test-nsc.sh | |
parent | 6c2eeae273552ed0be32b90d0c5604d07509e454 (diff) | |
download | scala-efcdf649975455deacebf36ad5b62cc30ab06353.tar.gz scala-efcdf649975455deacebf36ad5b62cc30ab06353.tar.bz2 scala-efcdf649975455deacebf36ad5b62cc30ab06353.zip |
- added shell variables.
- added CVS header.
- changed "ln -s" to "$CP" (concrete-*.xml).
Diffstat (limited to 'ant-test-nsc.sh')
-rwxr-xr-x | ant-test-nsc.sh | 44 |
1 files changed, 32 insertions, 12 deletions
diff --git a/ant-test-nsc.sh b/ant-test-nsc.sh index 93f130ef63..a8c5d8927c 100755 --- a/ant-test-nsc.sh +++ b/ant-test-nsc.sh @@ -1,26 +1,46 @@ -#!/bin/sh +#!/bin/bash +########################################################-*-Shell-script-*-#### +# Test nsc +############################################################################## +# $Id$ . ant-common.sh +############################################################################## # jar with fjbg, scala runtime -if ! addJar $fjbg_jar fjbg_jar; then exit -1; fi -if ! addJar $tools_jar tools_jar; then exit -1; fi -if ! addJar $scala_jar scala_jar; then echo "try: make jar target=LIBRARY" && exit -1; fi +if ! addJar $fjbg_jar fjbg_jar; then exit -1; fi +if ! addJar $tools_jar tools_jar; then exit -1; fi +if ! addJar $scala_jar scala_jar; then + $ECHO "try: make jar target=LIBRARY" && exit -1; +fi + +############################################################################## # jars for `nsc' task (once its compiled) -if ! addJar $jars_dir/nsc4ant.jar "jars_dir containing nsc4ant"; then echo "try 'sh ant-build-nsc.sh build.nsc4'" && exit -1; fi -if ! addJar $jars_dir/nsc.jar "jars_dir containing nsc.jar"; then echo "try 'sh ant-build-nsc.sh'" && exit -1; fi -export CLASSPATH +if [ ! addJar $nsc4ant_jar nsc4ant_jar ]; then + $ECHO "try 'sh ant-build-nsc.sh build.nsc4'" && exit -1; +fi +if [ ! addJar $nsc_jar nsc_jar ]; then + $ECHO "try 'sh ant-build-nsc.sh'" && exit -1; +fi + +############################################################################## +# ant build + +ANT_CONFIGFILE=test-nsc.xml +ANT_BUILDFILE=concrete-$ANT_CONFIGFILE +ANT_EXCLFILE=developer/${USER}/test-nsc-excludes.xml # for debugging your classpath #echo $CLASSPATH -if [ -f developer/${USER}/test-nsc-excludes.xml ]; then - sed -e "s/userExcludes\ \"\"/userExcludes\ SYSTEM\ \"developer\/${USER}\/test-nsc-excludes.xml\"/" < test-nsc.xml > concrete-test-nsc.xml; +if [ -f "$ANT_EXCLFILE" ]; then + $SED -e "s#userExcludes\ \"\"#userExcludes\ SYSTEM\ \"$ANT_EXCLFILE\"#" < $ANT_CONFIGFILE > $ANT_BUILDFILE; else - ln -s test-nsc.xml concrete-test-nsc.xml; + $CP $ANT_CONFIGFILE $ANT_BUILDFILE; fi -ant -f concrete-test-nsc.xml $* -rm -f concrete-test-ncs.xml +CLASSPATH="$CLASSPATH" $ANT_CMD $ANT_OPTS -f "$ANT_BUILDFILE" $* +$RM "$ANT_BUILDFILE" +############################################################################## |