Config: Fix calling b2sum

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2022-04-04 16:03:18 +00:00
parent dcb3c4aaac
commit 62d9b7bd2c

View File

@@ -347,13 +347,13 @@ endef
define LOAD
@echo -e "$(MESSAGE)Download: $($(notdir $@))"
wget -T 60 -t 1 -nv -U "IPFireSourceGrabber/2.x" $($(notdir $@)) -O $(DIR_TMP)/$(notdir $@)
[ "$($(notdir $@)_BLAKE2)" = "$(firstword $(shell b2sum $(DIR_TMP)/$(notdir $@)))" ] # detect page not found answer
[ "$($(notdir $@)_BLAKE2)" = "$$(b2sum $(DIR_TMP)/$(notdir $@) | awk '{ print $$1 }')" ] # detect page not found answer
mv $(DIR_TMP)/$(notdir $@) $(DIR_DL)
endef
define B2SUM
# error mean file signature don't match the one in lfs script
[ "$($@_BLAKE2)" = "$(firstword $(shell b2sum $(DIR_DL)/$@))" ] && echo "$@ checksum OK"
[ "$($@_BLAKE2)" = "$$(b2sum $(DIR_DL)/$@ | awk '{ print $$1 }')" ] && echo "$@ checksum OK"
endef
define PAK