mirror of
https://github.com/hashicorp/packer.git
synced 2026-05-28 04:35:38 -04:00
scripts: copy packer- prefixed bins properly [GH-1467]
This commit is contained in:
parent
db90c16118
commit
a23eb7512f
1 changed files with 13 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue