Skip to content

Commit

Permalink
Use sha1 on macOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
NullHypothesis committed Nov 30, 2024
1 parent 01fda1a commit f3fe50d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit f3fe50d

Please sign in to comment.