summaryrefslogtreecommitdiff
path: root/bin/.scala_bat.tmpl
blob: 0feb2419d548c8dd8af4364146016b5ea4feedf0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@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

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%.
goto end

:end
if "%OS%"=="Windows_NT" @endlocal