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