summaryrefslogtreecommitdiff
path: root/support/windows/scala_wrapper-footer.bat
blob: 78900804d56c1816895e38c5791cf61c75eacbd9 (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
if "%SCALA_HOME%" == "" goto error1
if not exist "%SCALA_HOME%\VERSION-%VERSION%" goto error2

set ARGS=

:loop
if '%1' == '' goto exec
set ARGS=%ARGS% %1
shift
goto loop

:exec
%COMMAND% %ARGS%
goto end

: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
set VERSION=
set COMMAND=

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