build-style/go: support building subdirectories

This commit is contained in:
Dominik Honnef 2015-04-17 18:18:35 +02:00
parent 4df6e4d709
commit 382449cb6e
2 changed files with 12 additions and 5 deletions

View file

@ -9,10 +9,14 @@ do_build() {
ln -fs $PWD "${path}"
fi
go get -d "${go_import_path}"
go build -x "${go_import_path}"
go_package=${go_package:-$go_import_path}
cd "${GOPATH}/src/${go_package}"
go get -d "${go_package}"
go build -x "${go_package}"
}
do_install() {
go_package=${go_package:-$go_import_path}
cd "${GOPATH}/src/${go_package}"
vbin ${pkgname}
}