mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
b298960aed
"set -e" is already inherited here from make.sh, but explicit is always better than implicit (hence the "set -e" in the first place!) Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
24 lines
663 B
Bash
24 lines
663 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
DEST=$1
|
|
|
|
# if we have our linux/amd64 version compiled, let's symlink it in
|
|
if [ -x "$DEST/../binary/docker-$VERSION" ]; then
|
|
mkdir -p "$DEST/linux/amd64"
|
|
(
|
|
cd "$DEST/linux/amd64"
|
|
ln -s ../../../binary/* ./
|
|
)
|
|
echo "Created symlinks:" "$DEST/linux/amd64/"*
|
|
fi
|
|
|
|
for platform in $DOCKER_CROSSPLATFORMS; do
|
|
(
|
|
mkdir -p "$DEST/$platform" # bundles/VERSION/cross/GOOS/GOARCH/docker-VERSION
|
|
export GOOS=${platform%/*}
|
|
export GOARCH=${platform##*/}
|
|
export LDFLAGS_STATIC_DOCKER="" # we just need a simple client for these platforms (TODO this might change someday)
|
|
source "$(dirname "$BASH_SOURCE")/binary" "$DEST/$platform"
|
|
)
|
|
done
|