File: mktypes.bash

package info (click to toggle)
golang-github-elisescu-pty 1.0.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 176 kB
  • sloc: sh: 14; makefile: 2
file content (19 lines) | stat: -rwxr-xr-x 321 bytes parent folder | download | duplicates (2)
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)
	$GODEFS types_$GOOS.go |gofmt > ztypes_$GOOSARCH.go
	;;
esac