vp-build/common/build-style/go.sh
Dominik Honnef a62f407007 set Go env vars in environment
This way, a template can overwrite do_build but still have good defaults
for GOPATH, GOARCH and GOARM.
2015-02-21 14:49:02 +01:00

19 lines
312 B
Bash

#
# This helper is for templates for Go packages.
#
do_build() {
if [[ "${go_get}" != "yes" ]]; then
local path="${GOPATH}/src/${go_import_path}"
mkdir -p "$(dirname ${path})"
ln -fs $PWD "${path}"
fi
go get -d "${go_import_path}"
go build -x "${go_import_path}"
}
do_install() {
vbin ${pkgname}
}