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