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