mirror of https://github.com/shirou/gopsutil
fix mktypes.sh
parent
ab0d977709
commit
f9c39a6d8f
@ -1,19 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
PKGS="cpu disk docker host load mem net process"
|
||||
PKGS="cpu disk docker host load mem net process sensors winservices"
|
||||
|
||||
GOOS=$(go env GOOS)
|
||||
GOARCH=$(go env GOARCH)
|
||||
|
||||
for DIR in .
|
||||
for PKG in $PKGS
|
||||
do
|
||||
(cd "$DIR" || exit
|
||||
for PKG in $PKGS
|
||||
do
|
||||
if [ -e "${PKG}/types_${GOOS}.go" ]; then
|
||||
(echo "// +build $GOOS"
|
||||
echo "// +build $GOARCH"
|
||||
go tool cgo -godefs "${PKG}/types_${GOOS}.go") | gofmt > "${PKG}/${PKG}_${GOOS}_${GOARCH}.go"
|
||||
fi
|
||||
done)
|
||||
done
|
||||
|
Loading…
Reference in New Issue