scripts: copy binaries to gopath

This commit is contained in:
Mitchell Hashimoto 2014-09-29 18:18:14 -07:00
parent 3f80a27b90
commit 5152f05d0a
1 changed files with 12 additions and 0 deletions

View File

@ -52,10 +52,22 @@ for PLATFORM in $(find ./pkg -mindepth 1 -maxdepth 1 -type d); do
set -e set -e
done 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 # Copy our OS/Arch to the bin/ directory
DEV_PLATFORM="./pkg/$(go env GOOS)_$(go env GOARCH)" DEV_PLATFORM="./pkg/$(go env GOOS)_$(go env GOARCH)"
for F in $(find ${DEV_PLATFORM} -mindepth 1 -maxdepth 1 -type f); do for F in $(find ${DEV_PLATFORM} -mindepth 1 -maxdepth 1 -type f); do
cp ${F} bin/ cp ${F} bin/
cp ${F} ${MAIN_GOPATH}/bin/
done done
if [ "${TF_DEV}x" = "x" ]; then if [ "${TF_DEV}x" = "x" ]; then