File tree 1 file changed +21
-1
lines changed
1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,28 @@ goto end
32
32
33
33
:setScalaOpts
34
34
35
+ @ REM sfind the index of the first colon in _PROG_HOME
36
+ set " index = 0"
37
+ set " char = !_PROG_HOME:~%index%,1 ! "
38
+ :findColon
39
+ if not " %char% " == " :" (
40
+ set /a " index += 1"
41
+ set " char = !_PROG_HOME:~%index%,1 ! "
42
+ goto :findColon
43
+ )
44
+
45
+ @ REM set _PROG_HOME to the substring from the first colon to the end
46
+ set " _PROG_HOME_SUB = !_PROG_HOME:~%index%! "
47
+ @ REM strip initial character
48
+ set " _PROG_HOME_SUB = !_PROG_HOME_SUB:~1 ! "
49
+
50
+ @ REM set drive to substring from 0 to the first colon
51
+ set " _PROG_HOME_DRIVE = !_PROG_HOME:~0 ,%index%! "
52
+
53
+
54
+
35
55
set " _SCALA_VERSION = "
36
- set " MVN_REPOSITORY = file://%_PROG_HOME :\ =/ % /maven2"
56
+ set " MVN_REPOSITORY = file://%_PROG_HOME_DRIVE% \ %_PROG_HOME_SUB :\ =/ % /maven2"
37
57
set " SCALA_CLI_JAR = %_PROG_HOME% \etc\scala-cli.jar"
38
58
39
59
@ rem read for version:=_SCALA_VERSION in VERSION_FILE
You can’t perform that action at this time.
0 commit comments