mirror of
https://github.com/golang/go
synced 2024-11-08 15:16:25 -07:00
20 lines
503 B
Bash
20 lines
503 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
set -e
|
||
|
|
||
|
# Windows has the most dependencies.
|
||
|
export GOOS=windows
|
||
|
|
||
|
(
|
||
|
echo '// generated by mkdeps.bash'
|
||
|
echo
|
||
|
echo 'package main'
|
||
|
echo
|
||
|
echo 'var builddeps = map[string][]string{'
|
||
|
|
||
|
deps=$(GOOS=windows go list -tags cmd_go_bootstrap -f '{{join .Deps "\n"}}' cmd/go | grep -v '^unsafe$')
|
||
|
GOOS=windows go list -tags cmd_go_bootstrap -f '{{printf "%q" .ImportPath}}: { {{range .Deps}}{{if not (eq . "unsafe")}}{{printf "%q" .}}, {{end}}{{end}} },' $deps cmd/go
|
||
|
|
||
|
echo '}'
|
||
|
) |gofmt >deps.go
|