Skip to content

Commit

Permalink
Update makefile to fail fast if download-network fails
Browse files Browse the repository at this point in the history
Bench: 2625158
  • Loading branch information
jhonnold committed Nov 23, 2024
1 parent 899c0be commit 8a6282e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,21 @@ download-network:
echo "Downloaded network $(EVALFILE) and verified"; \
else \
echo "Downloaded network $(EVALFILE) failed validation"; \
exit 1; \
fi; \
elif hash sha256sum 2>/dev/null; then \
if [ "$(EVALFILE)" = "berserk-"`sha256sum $(EVALFILE) | cut -c1-12`".nn" ]; then \
echo "Downloaded network $(EVALFILE) and verified"; \
else \
echo "Downloaded network $(EVALFILE) failed validation"; \
exit 1; \
fi; \
else \
echo "Downloaded network $(EVALFILE), but unable to verify"; \
fi; \
else \
echo "Unable to downlaod network: $(EVALFILE)"; \
echo "Unable to download network: $(EVALFILE)"; \
exit 1; \
fi; \
elif test -f "$(EVALFILE)"; then \
echo "Using network: $(EVALFILE)"; \
Expand Down

0 comments on commit 8a6282e

Please sign in to comment.