\r
if exist make.bat goto ok\r
echo all.bat must be run from go\src\r
-:: cannot exit: would kill parent command interpreter\r
-goto end\r
+exit /b 1\r
:ok\r
\r
call .\make.bat --no-banner --no-local\r
-if %GOBUILDFAIL%==1 goto end\r
+if errorlevel 1 goto fail\r
call .\run.bat --no-rebuild --no-local\r
-if %GOBUILDFAIL%==1 goto end\r
+if errorlevel 1 goto fail\r
"%GOTOOLDIR%/dist" banner\r
+goto :eof\r
\r
-:end\r
-if x%GOBUILDEXIT%==x1 exit %GOBUILDFAIL%\r
+:fail\r
+exit /b 1\r
\r
setlocal\r
\r
-set GOBUILDFAIL=0\r
-\r
go tool dist env -w -p >env.bat\r
if errorlevel 1 goto fail\r
call .\env.bat\r
"%GOBIN%\go" tool dist clean\r
"%GOBIN%\go" clean -i cmd\r
\r
-goto end\r
+goto :eof\r
\r
:fail\r
-set GOBUILDFAIL=1\r
-\r
-:end\r
-if x%GOBUILDEXIT%==x1 exit %GOBUILDFAIL%\r
+exit /b 1\r
setlocal\r
:nolocal\r
\r
-set GOBUILDFAIL=0\r
-\r
if exist make.bat goto ok\r
echo Must run make.bat from Go src directory.\r
goto fail\r
echo Set GOROOT_BOOTSTRAP to a working Go tree ^>= Go %bootgo%.\r
\r
:fail\r
-set GOBUILDFAIL=1\r
-if x%GOBUILDEXIT%==x1 exit %GOBUILDFAIL%\r
+exit /b 1\r
\r
if exist make.bat goto ok\r
echo race.bat must be run from go\src\r
-:: cannot exit: would kill parent command interpreter\r
-goto end\r
+exit /b 1\r
:ok\r
\r
set GOROOT=%CD%\..\r
\r
:continue\r
call .\make.bat --no-banner --no-local\r
-if %GOBUILDFAIL%==1 goto end\r
+if errorlevel 1 goto fail\r
echo # go install -race std\r
go install -race std\r
if errorlevel 1 goto fail\r
go tool dist test -race\r
\r
if errorlevel 1 goto fail\r
-goto succ\r
+echo All tests passed.\r
+goto :eof\r
\r
:fail\r
-set GOBUILDFAIL=1\r
echo Fail.\r
-goto end\r
-\r
-:succ\r
-echo All tests passed.\r
-\r
-:end\r
-if x%GOBUILDEXIT%==x1 exit %GOBUILDFAIL%\r
+exit /b 1\r
setlocal\r
:nolocal\r
\r
-set GOBUILDFAIL=0\r
-\r
set GOENV=off\r
..\bin\go tool dist env > env.bat\r
if errorlevel 1 goto fail\r
if x%1==x--no-rebuild goto norebuild\r
..\bin\go tool dist test --rebuild\r
if errorlevel 1 goto fail\r
-goto end\r
+goto :eof\r
\r
:norebuild\r
..\bin\go tool dist test\r
if errorlevel 1 goto fail\r
-goto end\r
+goto :eof\r
\r
:fail\r
-set GOBUILDFAIL=1\r
-\r
-:end\r
+exit /b 1\r