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