Skip to content

Commit cdbd69a

Browse files
committed
fix scaladoc.bat
1 parent 87cceff commit cdbd69a

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

dist/bin/scaladoc.bat

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,30 +107,32 @@ goto :eof
107107
@rem It contains the path th the absolute classpaths
108108
:classpathArgs
109109

110-
set _ETC_DIR="%_PROG_HOME%\etc"
111-
set _TMP_DIR="%_PROG_HOME%\tmp"
112-
set _INPUT_CLASSPATH_FILE="%_ETC_DIR%\scaladoc.classpath"
113-
set _OUTPUT_CLASSPATH_FILE="%_TMP_DIR%\scaladoc.classpath"
110+
set "_ETC_DIR=%_PROG_HOME%\etc"
111+
set "_TMP_DIR=%_PROG_HOME%\tmp"
112+
set "_INPUT_CLASSPATH_FILE=%_ETC_DIR%\scaladoc.classpath"
113+
set "_OUTPUT_CLASSPATH_FILE=%_TMP_DIR%\scaladoc.classpath"
114114

115115
@rem Check if the _TMP_DIR exists. If not, create it (first time we run the command)
116-
if not exist "%TMP_DIR%" ( mkdir "%TMP_DIR%" )
116+
if not exist "%_TMP_DIR%" ( mkdir "%_TMP_DIR%" )
117117

118118
@rem If the file doesn't exist, create it (first time we run the command)
119119
if not exist "%_OUTPUT_CLASSPATH_FILE%" ( call :loadClasspathFromFile )
120-
set _CLASS_PATH_FILE="%_OUTPUT_CLASSPATH_FILE%"
120+
set "_CLASS_PATH_FILE=%_OUTPUT_CLASSPATH_FILE%"
121121
goto :eof
122122

123123
@REM concatentate every line in _INPUT_CLASSPATH_FILE and dump it in the with _PSEP
124124
:loadClasspathFromFile
125-
set _CLASS_PATH=
126125
if exist "%_INPUT_CLASSPATH_FILE%" (
127-
for /f "usebackq delims=" %%i in "%_INPUT_CLASSPATH_FILE%" do (
128-
set _LIB="%_PROG_HOME%\maven2\%%i"
126+
(echo | set /p=^""") "%_OUTPUT_CLASSPATH_FILE%"
127+
for /f "usebackq delims=" %%i in ("%_INPUT_CLASSPATH_FILE%") do (
128+
set "_LIB=%_PROG_HOME%\maven2\%%i"
129129
@rem Adapt the paths from Unix style to MS-DOS style
130130
set "_LIB=!_LIB:/=\!"
131+
set "_LIB=!_LIB:\=\\!"
131132
@rem Append the processed line to the output file, ensuring a new line
132-
echo !_LIB! >> "%_OUTPUT_CLASSPATH_FILE%"
133+
(echo | set /p=!_LIB!!_PSEP!) >> "%_OUTPUT_CLASSPATH_FILE%"
133134
)
135+
(echo | set /p=^""") "%_OUTPUT_CLASSPATH_FILE%"
134136
)
135137
goto :eof
136138

0 commit comments

Comments
 (0)