mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
make.sh tgz should handle windows binary
Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
This commit is contained in:
parent
92d24e3b7c
commit
17f8e3dee2
1 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue