diff --git a/scripts/build.sh b/scripts/build.sh index d17f96dfe..0da1ce305 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -52,10 +52,23 @@ 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 +echo "==> Copying binaries for this platform..." 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