From 17f8e3dee2d0df54b848cbb13af1986abe07db9f Mon Sep 17 00:00:00 2001 From: "Daniel, Dao Quang Minh" Date: Tue, 16 Dec 2014 05:05:12 -0500 Subject: [PATCH] make.sh tgz should handle windows binary Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh (github: dqminh) --- project/make/tgz | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/project/make/tgz b/project/make/tgz index 120339976b..9307200ccb 100644 --- a/project/make/tgz +++ b/project/make/tgz @@ -13,13 +13,19 @@ fi for d in "$CROSS/"*/*; do GOARCH="$(basename "$d")" GOOS="$(basename "$(dirname "$d")")" + BINARY_NAME="docker-$VERSION" + BINARY_EXTENSION= + if [ "$GOOS" = 'windows' ]; then + BINARY_EXTENSION='.exe' + fi + BINARY_FULLNAME="$BINARY_NAME$BINARY_EXTENSION" mkdir -p "$DEST/$GOOS/$GOARCH" - TGZ="$DEST/$GOOS/$GOARCH/docker-$VERSION.tgz" + TGZ="$DEST/$GOOS/$GOARCH/$BINARY_NAME.tgz" mkdir -p "$DEST/build" mkdir -p "$DEST/build/usr/local/bin" - cp -L "$d/docker-$VERSION" "$DEST/build/usr/local/bin/docker" + cp -L "$d/$BINARY_FULLNAME" "$DEST/build/usr/local/bin/docker" tar --numeric-owner --owner 0 -C "$DEST/build" -czf "$TGZ" usr