2013-12-19 01:06:14 -05:00
|
|
|
#!/bin/bash
|
2014-04-08 00:14:19 -04:00
|
|
|
set -e
|
2013-12-19 01:06:14 -05:00
|
|
|
|
|
|
|
DEST=$1
|
|
|
|
|
2013-12-24 01:31:53 -05:00
|
|
|
# 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
|
|
|
|
|
2013-12-19 01:06:14 -05:00
|
|
|
for platform in $DOCKER_CROSSPLATFORMS; do
|
|
|
|
(
|
2013-12-24 01:31:53 -05:00
|
|
|
mkdir -p "$DEST/$platform" # bundles/VERSION/cross/GOOS/GOARCH/docker-VERSION
|
2013-12-19 01:06:14 -05:00
|
|
|
export GOOS=${platform%/*}
|
|
|
|
export GOARCH=${platform##*/}
|
2014-03-06 21:55:22 -05:00
|
|
|
export LDFLAGS_STATIC_DOCKER="" # we just need a simple client for these platforms (TODO this might change someday)
|
2013-12-24 01:31:53 -05:00
|
|
|
source "$(dirname "$BASH_SOURCE")/binary" "$DEST/$platform"
|
2013-12-19 01:06:14 -05:00
|
|
|
)
|
|
|
|
done
|