From 5152f05d0a4d0a7f21de175269945f79da54cc1d Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 29 Sep 2014 18:18:14 -0700 Subject: [PATCH] scripts: copy binaries to gopath --- scripts/build.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/build.sh b/scripts/build.sh index c7ed8b675..5697f472c 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -52,10 +52,22 @@ for PLATFORM in $(find ./pkg -mindepth 1 -maxdepth 1 -type d); do set -e done +# Move all the compiled things to the $GOPATH/bin +GOPATH=${GOPATH:-$(go env GOPATH)} +case $(uname) in + CYGWIN*) + GOPATH="$(cygpath $GOPATH)" + ;; +esac +OLDIFS=$IFS +IFS=: MAIN_GOPATH=($GOPATH) +IFS=$OLDIFS + # Copy our OS/Arch to the bin/ directory DEV_PLATFORM="./pkg/$(go env GOOS)_$(go env GOARCH)" for F in $(find ${DEV_PLATFORM} -mindepth 1 -maxdepth 1 -type f); do cp ${F} bin/ + cp ${F} ${MAIN_GOPATH}/bin/ done if [ "${TF_DEV}x" = "x" ]; then