cross 649 B

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