From f3fe50dbbadac83620abce96df4f47a7bae1d27f Mon Sep 17 00:00:00 2001 From: Philipp Winter Date: Sat, 30 Nov 2024 10:06:51 -0600 Subject: [PATCH] Use `sha1` on macOS. --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ef796bc..2c2950c 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,13 @@ image_eif := $(prog).eif cover_out = cover.out cover_html = cover.html +# Use sha1sum on Linux and sha1 on macOS. +ifeq ($(shell uname),Darwin) + hash = sha1 +else + hash = sha1sum +endif + all: $(prog) .PHONY: lint @@ -83,11 +90,11 @@ $(prog): $(godeps) -ldflags="-s -w" \ -buildvcs=false \ -o $(prog) - @sha1sum "$(prog_dir)/$(prog)" + @$(hash) "$(prog_dir)/$(prog)" $(verify_prog): $(godeps) @go build -C $(verify_prog_dir) -o $(verify_prog) - @sha1sum "$(verify_prog_dir)/$(verify_prog)" + @$(hash) "$(verify_prog_dir)/$(verify_prog)" .PHONY: clean clean: