File: mktypes.bash

package info (click to toggle)
golang-pty 1.1.6-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 244 kB
  • sloc: sh: 140; makefile: 3
file content (19 lines) | stat: -rwxr-xr-x 329 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash

GOOSARCH="${GOOS}_${GOARCH}"
case "$GOOSARCH" in
_* | *_ | _)
	echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2
	exit 1
	;;
esac

GODEFS="go tool cgo -godefs"

$GODEFS types.go |gofmt > ztypes_$GOARCH.go

case $GOOS in
freebsd|dragonfly|openbsd)
	$GODEFS types_$GOOS.go |gofmt > ztypes_$GOOSARCH.go
	;;
esac