mirror of https://github.com/elisescu/tty-share
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
321 B
Bash
20 lines
321 B
Bash
4 years ago
|
#!/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
|