From 1bdee1e512ebbe368e0154e735d3599022491cea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Tue, 2 Feb 2021 14:15:15 +0100 Subject: [PATCH] build: try sha256sum if shasum is not present MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit shasum is not always available and sha256sum seems to exist more often since it's part of coreutils where sha256sum comes with perl. Signed-off-by: Sébastien Han --- build/makelib/common.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/makelib/common.mk b/build/makelib/common.mk index e303a2ac4..14ce58c03 100644 --- a/build/makelib/common.mk +++ b/build/makelib/common.mk @@ -16,7 +16,13 @@ .SUFFIXES: SHELL := /bin/bash +ifneq (, $(shell command -v shasum)) SHA256CMD := shasum -a 256 +else ifneq (, $(shell command -v sha256sum)) +SHA256CMD := sha256sum +else +$(error "please install 'shasum' or 'sha256sum'") +endif ifeq ($(origin PLATFORM), undefined) ifeq ($(origin GOOS), undefined)