github.com/torfuzx/docker@v1.8.1/hack/make/cross (about) 1 #!/bin/bash 2 set -e 3 4 # explicit list of os/arch combos that support being a daemon 5 declare -A daemonSupporting 6 daemonSupporting=( 7 [linux/amd64]=1 8 ) 9 10 # if we have our linux/amd64 version compiled, let's symlink it in 11 if [ -x "$DEST/../binary/docker-$VERSION" ]; then 12 mkdir -p "$DEST/linux/amd64" 13 ( 14 cd "$DEST/linux/amd64" 15 ln -s ../../../binary/* ./ 16 ) 17 echo "Created symlinks:" "$DEST/linux/amd64/"* 18 fi 19 20 for platform in $DOCKER_CROSSPLATFORMS; do 21 ( 22 export DEST="$DEST/$platform" # bundles/VERSION/cross/GOOS/GOARCH/docker-VERSION 23 mkdir -p "$DEST" 24 ABS_DEST="$(cd "$DEST" && pwd -P)" 25 export GOOS=${platform%/*} 26 export GOARCH=${platform##*/} 27 if [ -z "${daemonSupporting[$platform]}" ]; then 28 export LDFLAGS_STATIC_DOCKER="" # we just need a simple client for these platforms 29 export BUILDFLAGS=( "${ORIG_BUILDFLAGS[@]/ daemon/}" ) # remove the "daemon" build tag from platforms that aren't supported 30 fi 31 source "${MAKEDIR}/binary" 32 ) 33 done