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 7setlocal 8 9set GOBUILDFAIL=0 10 11go tool dist env -w -p >env.bat 12if errorlevel 1 goto fail 13call .\env.bat 14del env.bat 15echo. 16 17if exist %GOTOOLDIR%\dist.exe goto distok 18echo cannot find %GOTOOLDIR%\dist; nothing to clean 19goto fail 20:distok 21 22"%GOBIN%\go" clean -i std 23"%GOBIN%\go" tool dist clean 24"%GOBIN%\go" clean -i cmd 25 26goto end 27 28:fail 29set GOBUILDFAIL=1 30 31:end 32if x%GOBUILDEXIT%==x1 exit %GOBUILDFAIL% 33