#!/bin/bash
set -e

cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"

set -x

docker build --pull -t gosu .

rm -f gosu* SHA256SUMS*
docker run --rm gosu bash -c 'cd /go/bin && tar -c gosu*' | tar -xv
sha256sum gosu* | tee SHA256SUMS
ls -lFh gosu* SHA256SUMS*

"./gosu-$(dpkg --print-architecture)" || :

#!/bin/bash
set -e

cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"

set -x

docker build --pull -t gosu .

rm -f gosu* SHA256SUMS*
docker run --rm gosu sh -c 'cd /go/bin && tar -c gosu*' | tar -xv
sha256sum gosu* | tee SHA256SUMS
ls -lFh gosu* SHA256SUMS*

"./gosu-$(dpkg --print-architecture)" || :

Use "sh" instead of "bash" for extracting built binaries (especially important since we're on Alpine now and don't have bash)
Use "sh" instead of "bash" for extracting built binaries (especially important since we're on Alpine now and don't have bash)
