1:: Copyright 2012 The Go Authors. All rights reserved. 2:: Use of this source code is governed by a BSD-style 3:: license that can be found in the LICENSE file. 4 5@echo off 6 7if exist ..\bin\go.exe goto ok 8echo Must run run.bat from Go src directory after installing cmd/go. 9goto fail 10:ok 11 12:: Keep environment variables within this script 13:: unless invoked with --no-local. 14if x%1==x--no-local goto nolocal 15if x%2==x--no-local goto nolocal 16setlocal 17:nolocal 18 19set GOBUILDFAIL=0 20 21set GOENV=off 22..\bin\go tool dist env > env.bat 23if errorlevel 1 goto fail 24call .\env.bat 25del env.bat 26 27set GOPATH=c:\nonexist-gopath 28 29if x%1==x--no-rebuild goto norebuild 30..\bin\go tool dist test --rebuild 31if errorlevel 1 goto fail 32goto end 33 34:norebuild 35..\bin\go tool dist test 36if errorlevel 1 goto fail 37goto end 38 39:fail 40set GOBUILDFAIL=1 41 42:end 43