mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
52379fa76d
This is especially important for distributions like NixOS where `/bin/bash` doesn't exist, or for MacOS users who've installed a newer version of Bash than the one that comes with their OS. Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
20 lines
678 B
Bash
20 lines
678 B
Bash
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
# explicit list of os/arch combos that support being a daemon
|
|
declare -A daemonSupporting
|
|
daemonSupporting=(
|
|
[linux/amd64]=1
|
|
[windows/amd64]=1
|
|
)
|
|
platform="windows/amd64"
|
|
export DEST="$DEST/$platform" # bundles/VERSION/cross/GOOS/GOARCH/docker-VERSION
|
|
mkdir -p "$DEST"
|
|
ABS_DEST="$(cd "$DEST" && pwd -P)"
|
|
export GOOS=${platform%/*}
|
|
export GOARCH=${platform##*/}
|
|
if [ -z "${daemonSupporting[$platform]}" ]; then
|
|
export LDFLAGS_STATIC_DOCKER="" # we just need a simple client for these platforms
|
|
export BUILDFLAGS=( "${ORIG_BUILDFLAGS[@]/ daemon/}" ) # remove the "daemon" build tag from platforms that aren't supported
|
|
fi
|
|
source "${MAKEDIR}/binary"
|