2015-02-21 13:38:37 +01:00
|
|
|
#
|
|
|
|
# This helper is for templates for Go packages.
|
|
|
|
#
|
|
|
|
|
|
|
|
do_build() {
|
|
|
|
if [[ "${go_get}" != "yes" ]]; then
|
2015-02-21 13:52:10 +01:00
|
|
|
local path="${GOPATH}/src/${go_import_path}"
|
2015-02-21 13:38:37 +01:00
|
|
|
mkdir -p "$(dirname ${path})"
|
|
|
|
ln -fs $PWD "${path}"
|
|
|
|
fi
|
|
|
|
|
2015-04-17 18:18:35 +02:00
|
|
|
go_package=${go_package:-$go_import_path}
|
2015-05-04 13:39:15 +02:00
|
|
|
go get -x ${go_package}
|
2015-02-21 13:38:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
2015-06-12 13:21:10 +02:00
|
|
|
find "${GOBIN}" -type f -executable | while read line
|
|
|
|
do
|
|
|
|
vbin "${line}"
|
2015-05-04 13:39:15 +02:00
|
|
|
done
|
2015-02-21 13:38:37 +01:00
|
|
|
}
|