2013-12-19 06:06:14 +00:00
|
|
|
#!/bin/bash
|
2014-04-08 04:14:19 +00:00
|
|
|
set -e
|
2013-12-19 06:06:14 +00:00
|
|
|
|
2014-08-01 22:57:28 +00:00
|
|
|
# explicit list of os/arch combos that support being a daemon
|
|
|
|
declare -A daemonSupporting
|
|
|
|
daemonSupporting=(
|
|
|
|
[linux/amd64]=1
|
|
|
|
)
|
|
|
|
|
2013-12-24 06:31:53 +00: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 06:06:14 +00:00
|
|
|
for platform in $DOCKER_CROSSPLATFORMS; do
|
|
|
|
(
|
2015-05-29 20:07:16 +00:00
|
|
|
export DEST="$DEST/$platform" # bundles/VERSION/cross/GOOS/GOARCH/docker-VERSION
|
|
|
|
mkdir -p "$DEST"
|
|
|
|
ABS_DEST="$(cd "$DEST" && pwd -P)"
|
2013-12-19 06:06:14 +00:00
|
|
|
export GOOS=${platform%/*}
|
|
|
|
export GOARCH=${platform##*/}
|
2014-08-01 22:57:28 +00:00
|
|
|
if [ -z "${daemonSupporting[$platform]}" ]; then
|
|
|
|
export LDFLAGS_STATIC_DOCKER="" # we just need a simple client for these platforms
|
2014-09-25 18:22:24 +00:00
|
|
|
export BUILDFLAGS=( "${ORIG_BUILDFLAGS[@]/ daemon/}" ) # remove the "daemon" build tag from platforms that aren't supported
|
2014-08-01 22:57:28 +00:00
|
|
|
fi
|
2015-05-29 20:07:16 +00:00
|
|
|
source "${MAKEDIR}/binary"
|
2013-12-19 06:06:14 +00:00
|
|
|
)
|
|
|
|
done
|