github.com/dolfly/pty@v1.2.1/mktypes.bash (about) 1 #!/usr/bin/env bash 2 3 GOOSARCH="${GOOS}_${GOARCH}" 4 case "$GOOSARCH" in 5 _* | *_ | _) 6 echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2 7 exit 1 8 ;; 9 esac 10 11 GODEFS="go tool cgo -godefs" 12 13 $GODEFS types.go |gofmt > ztypes_$GOARCH.go 14 15 case $GOOS in 16 freebsd|dragonfly|netbsd|openbsd) 17 $GODEFS types_$GOOS.go |gofmt > ztypes_$GOOSARCH.go 18 ;; 19 esac