File: mktypes.bash

package info (click to toggle)
golang-pty 0.0~git20151007.0.f7ee69f-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch, stretch-backports
  • size: 180 kB
  • ctags: 80
  • sloc: sh: 108; makefile: 3
file content (19 lines) | stat: -rwxr-xr-x 311 bytes parent folder | download | duplicates (3)
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)
	$GODEFS types_$GOOS.go |gofmt > ztypes_$GOOSARCH.go
	;;
esac