Add special handling for -XX, -XX:+ and -XX:0

This commit is contained in:
Michael Hsu 2019-11-11 10:59:06 +08:00
parent cb19634350
commit 1318c0f594
1 changed files with 18 additions and 14 deletions

View File

@ -428,8 +428,8 @@ if "%g:~0,2%" == "-D" (
)
)
if "%g:~0,3%" == "-XX" (
rem special handling for -D since '=' gets parsed away
if not "%g:~0,5%" == "-XX:+" if not "%g:~0,5%" == "-XX:-" if "%g:~0,3%" == "-XX" (
rem special handling for -XX since '=' gets parsed away
for /F "tokens=1 delims==" %%a in ("%g%") do (
rem make sure it doesn't have the '=' already
if "%g%" == "%%a" (
@ -614,21 +614,25 @@ set "p=%0"
if "%p:~0,2%" == "-D" (
rem special handling for -D since '=' gets parsed away
echo "%p%" | find "=" > nul
if ERRORLEVEL 1 if not "%~1" == "" (
echo %0=%1
shift
goto echolist
for /F "tokens=1 delims==" %%a in ("%p%") do (
rem make sure it doesn't have the '=' already
if "%p%" == "%%a" if not "%~1" == "" (
echo %0=%1
shift
goto echolist
)
)
)
if "%p:~0,3%" == "-XX" (
rem special handling for -D since '=' gets parsed away
echo "%p%" | find "=" > nul
if ERRORLEVEL 1 if not "%~1" == "" (
echo %0=%1
shift
goto echolist
if not "%p:~0,5%" == "-XX:+" if not "%p:~0,5%" == "-XX:-" if "%p:~0,3%" == "-XX" (
rem special handling for -XX since '=' gets parsed away
for /F "tokens=1 delims==" %%a in ("%p%") do (
rem make sure it doesn't have the '=' already
if "%p%" == "%%a" if not "%~1" == "" (
echo %0=%1
shift
goto echolist
)
)
)