1
0
mirror of https://github.com/golang/go synced 2024-11-08 15:16:25 -07:00
go/src/cmd/dist/mkdeps.bash

20 lines
503 B
Bash
Raw Normal View History

#!/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