summaryrefslogtreecommitdiff
path: root/sources/bin/nscala.win.tmpl
diff options
context:
space:
mode:
authorGilles Dubochet <gilles.dubochet@epfl.ch>2005-11-01 10:38:08 +0000
committerGilles Dubochet <gilles.dubochet@epfl.ch>2005-11-01 10:38:08 +0000
commitb5bb25e41823189701e45e4ca527a0dba952fe88 (patch)
treed00920f2ee11b022eaccfbdc4d4b63bf2544fca5 /sources/bin/nscala.win.tmpl
parent25152f0884db1a9854f3c6237a8805b9c2bb3099 (diff)
downloadscala-b5bb25e41823189701e45e4ca527a0dba952fe88.tar.gz
scala-b5bb25e41823189701e45e4ca527a0dba952fe88.tar.bz2
scala-b5bb25e41823189701e45e4ca527a0dba952fe88.zip
Updated SABBUS to generate functioning scalac a...
Updated SABBUS to generate functioning scalac and scala script (bug #469).
Diffstat (limited to 'sources/bin/nscala.win.tmpl')
-rw-r--r--sources/bin/nscala.win.tmpl48
1 files changed, 48 insertions, 0 deletions
diff --git a/sources/bin/nscala.win.tmpl b/sources/bin/nscala.win.tmpl
new file mode 100644
index 0000000000..139d3e5374
--- /dev/null
+++ b/sources/bin/nscala.win.tmpl
@@ -0,0 +1,48 @@
+@echo off
+
+rem ##########################################################################
+rem # Copyright @COPYRIGHT@
+rem #
+rem # This is free software; see the distribution for copying conditions.
+rem # There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
+rem # PARTICULAR PURPOSE.
+rem ##########################################################################
+
+if "%OS%"=="Windows_NT" @setlocal
+
+if "%SCALA_HOME%" == "" goto error1
+if not exist "%SCALA_HOME%\VERSION-@VERSION@" goto error2
+
+set _ARGS=
+:loop
+if '%1' == '' goto exec
+if '%1' == '-version' goto version
+set _ARGS=%_ARGS% %1
+shift
+goto loop
+
+:exec
+set _JAVACMD=java
+set _JAVAOPT=-Xbootclasspath/a:@BOOTCPATH@
+
+rem echo %_JAVACMD% %_JAVAOPT% %_ARGS%
+%_JAVACMD% %_JAVAOPT% %_ARGS%
+goto end
+
+:version
+echo @PRODUCT@ @VERSION@ -- @COPYRIGHT@
+goto end
+
+rem ##########################################################################
+rem # errors
+
+:error1
+echo ERROR: environment variable SCALA_HOME is undefined. It should point to the directory containing the file "VERSION-@VERSION@".
+goto end
+
+:error2
+echo ERROR: environment variable SCALA_HOME points to the wrong directory "%SCALA_HOME%". It should point to the directory containing the file "VERSION-@VERSION@".
+goto end
+
+:end
+if "%OS%"=="Windows_NT" @endlocal