cross 663 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. set -e
  3. DEST=$1
  4. # if we have our linux/amd64 version compiled, let's symlink it in
  5. if [ -x "$DEST/../binary/docker-$VERSION" ]; then
  6. mkdir -p "$DEST/linux/amd64"
  7. (
  8. cd "$DEST/linux/amd64"
  9. ln -s ../../../binary/* ./
  10. )
  11. echo "Created symlinks:" "$DEST/linux/amd64/"*
  12. fi
  13. for platform in $DOCKER_CROSSPLATFORMS; do
  14. (
  15. mkdir -p "$DEST/$platform" # bundles/VERSION/cross/GOOS/GOARCH/docker-VERSION
  16. export GOOS=${platform%/*}
  17. export GOARCH=${platform##*/}
  18. export LDFLAGS_STATIC_DOCKER="" # we just need a simple client for these platforms (TODO this might change someday)
  19. source "$(dirname "$BASH_SOURCE")/binary" "$DEST/$platform"
  20. )
  21. done