From 552427ff697b0e84ad0d8472e4d57c16d3f60483 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Tue, 20 Jul 2021 17:29:16 +0200 Subject: [PATCH] feat(ci): some systems do not have sha256sum only shasum one example is freebsd/macos shasum also requires two spaces between a hash and a filename --- build-docker.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build-docker.sh b/build-docker.sh index 5a727faa2..d20ad8252 100755 --- a/build-docker.sh +++ b/build-docker.sh @@ -74,7 +74,11 @@ else fi # check alpine checksum -echo "${ALPINE_CHECKSUM} ci/${ALPINE_TARBALL}" | sha256sum -c +if command -v sha256sum &> /dev/null ; then + echo "${ALPINE_CHECKSUM} ci/${ALPINE_TARBALL}" | sha256sum -c +else + echo "${ALPINE_CHECKSUM} ci/${ALPINE_TARBALL}" | shasum -a 256 -c +fi docker build --build-arg ALPINE_VERSION="$ALPINE_VERSION" --build-arg ALPINE_ARCH="$ALPINE_ARCH" --build-arg NIX_VERSION="$NIX_VERSION" -t "$CONTAINER_NAME" ci/