summaryrefslogtreecommitdiff
path: root/ant-build-nsc.sh
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2005-09-16 11:23:10 +0000
committermichelou <michelou@epfl.ch>2005-09-16 11:23:10 +0000
commit92c43defc4add3a23353b8a26cf12330741fee5a (patch)
tree84a9e63b5701336a02183c5ea2c70dd5089c59cc /ant-build-nsc.sh
parentae80c2257e0e2b943449d25af8b211ea382316d6 (diff)
downloadscala-92c43defc4add3a23353b8a26cf12330741fee5a.tar.gz
scala-92c43defc4add3a23353b8a26cf12330741fee5a.tar.bz2
scala-92c43defc4add3a23353b8a26cf12330741fee5a.zip
- classpath must be handled differently on Cygwin.
Diffstat (limited to 'ant-build-nsc.sh')
-rwxr-xr-xant-build-nsc.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/ant-build-nsc.sh b/ant-build-nsc.sh
index ef273d6a9f..b0aeb854f6 100755
--- a/ant-build-nsc.sh
+++ b/ant-build-nsc.sh
@@ -10,11 +10,23 @@
# ant build
CLASSPATH=$nsc_fjbg_jar:$nsc_scala_jar:$nsc_tools_jar:$nsc_jaco_jar
+PLATFORM=unix
+
+# For Cygwin, switch paths to appropriate format before running ant
+if $cygwin; then
+ if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then
+ format=mixed
+ else
+ format=windows
+ fi
+ CLASSPATH=`cygpath --path --$format "$CLASSPATH"`
+ PLATFORM=win
+fi
# for debugging your classpath
#echo CLASSPATH=$CLASSPATH
-CLASSPATH="$CLASSPATH" $ANT_CMD -Dplatform=unix -f "$ANT_BUILDFILE" $*
+CLASSPATH="$CLASSPATH" $ANT_CMD -Dplatform=$PLATFORM -f "$ANT_BUILDFILE" $*
$RM "$ANT_BUILDFILE"
##############################################################################