mirror of
https://github.com/golang/go
synced 2024-11-25 08:37:57 -07:00
30 lines
423 B
Batchfile
30 lines
423 B
Batchfile
|
@echo off
|
||
|
setlocal
|
||
|
for /f %%i in ("%0") do set cwd=%%~dpi
|
||
|
cd /d %cwd%
|
||
|
|
||
|
:: sanity checks
|
||
|
if exist "%cwd%"\bin\6g.exe (
|
||
|
set GOARCH=amd64
|
||
|
goto ok
|
||
|
)
|
||
|
|
||
|
if exist "%cwd%"\bin\8g.exe (
|
||
|
set GOARCH=386
|
||
|
goto ok
|
||
|
)
|
||
|
|
||
|
echo Unable to find the Go compiler
|
||
|
echo This batch file must run from the root Go folder
|
||
|
pause
|
||
|
exit
|
||
|
|
||
|
:ok
|
||
|
set GOROOT=%cwd%
|
||
|
set GOBIN=%GOROOT%\bin
|
||
|
set PATH=%GOBIN%;%PATH%
|
||
|
|
||
|
@CMD /F:ON
|
||
|
endlocal
|
||
|
|