Skip to content

Instantly share code, notes, and snippets.

@Grommish
Created November 12, 2020 19:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Grommish/384f9e9717ddf865164b932a5ef70bd7 to your computer and use it in GitHub Desktop.
Save Grommish/384f9e9717ddf865164b932a5ef70bd7 to your computer and use it in GitHub Desktop.
[ "3afe8aa6f51070a9291331698f133ef39cd360e485ea009cb44d1822cec3abdf" == "3afe8aa6f51070a9291331698f133ef39cd360e485ea009cb44d1822cec3abdf" ] || \
$(info No Match)
@Grommish
Copy link
Author

Grommish commented Nov 12, 2020

RUST_TMP_DIR:=$(TMP_DIR)/rust-install
RUST_INSTALL_FILE_NAME:=$(PKG_NAME)-$(PKG_VERSION)-install.tar.xz
RUST_INSTALL_FILE_HASH=$(strip $(shell cat $(DL_DIR)/$(RUST_INSTALL_FILE_NAME).sha256 | cut -d " " -f 1))
RUST_INSTALL_FILE_SHA256=$(strip $(shell sha256sum $(DL_DIR)/$(RUST_INSTALL_FILE_NAME) | cut -d " " -f 1))

define Host/ValidateInstallBinaries
	$(info In ValidateInstallBinaries)
	$(info HSH:$(RUST_INSTALL_FILE_HASH))
	$(info SHA:$(RUST_INSTALL_FILE_SHA256))

	[ "3afe8aa6f51070a9291331698f133ef39cd360e485ea009cb44d1822cec3abdf" -eq "3afe8aa6f51070a9291331698f133ef39cd360e485ea009cb44d1822cec3abdf" ] || \
	   $(info No Match)

	$(error Stop Time)
endef

In ValidateInstallBinaries
HSH:3afe8aa6f51070a9291331698f133ef39cd360e485ea009cb44d1822cec3abdf
SHA:3afe8aa6f51070a9291331698f133ef39cd360e485ea009cb44d1822cec3abdf
No Match
Makefile:163: *** Stop Time. Stop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment