Skip to content
This repository was archived by the owner on Dec 2, 2020. It is now read-only.

Commit 80cc1f8

Browse files
matthewpoerclareliguori
authored andcommitted
Support OSX md5 sha (#16)
1 parent 3c88cd3 commit 80cc1f8

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

scripts/build_binary.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,15 @@ GOOS=$TARGET_GOOS go build -a -tags="${BUILDTAGS}" -ldflags "-s ${VERSION_LDFLAG
3232
go test -v -tags="${BUILDTAGS}" -timeout 30s -short -cover $(go list ./img2lambda/... | grep -v /vendor/ | grep -v /internal/)
3333

3434
cd $1
35-
md5sum $2 > $2.md5
36-
sha256sum $2 > $2.sha256
35+
36+
if hash md5sum 2>/dev/null; then
37+
md5sum $2 > $2.md5
38+
else
39+
md5 $2 > $2.md5
40+
fi
41+
42+
if hash sha256sum 2>/dev/null; then
43+
sha256sum $2 > $2.sha256
44+
else
45+
shasum -a 256 $2 > $2.sha256
46+
fi

0 commit comments

Comments
 (0)