2bb87e4e07
Go 1.5 doesn't permit our use of GOBIN anymore, breaking cross-compilation (for details, see https://github.com/golang/go/issues/9769) In retrospect, I'm not sure why we set GOBIN in the first place; GOPATH/bin should suffice. Closes #2337
22 lines
386 B
Bash
22 lines
386 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_package=${go_package:-$go_import_path}
|
|
go get -x ${go_package}
|
|
}
|
|
|
|
do_install() {
|
|
find "${GOPATH}/bin" -type f -executable | while read line
|
|
do
|
|
vbin "${line}"
|
|
done
|
|
}
|