script: don't hardcode sha256sum of romfs

Add a temporary variable that can be replaced externally, via `sed` or
other mechanism.

Let our GitHub Actions workflow add the sha256sum of the built romfs.
This commit is contained in:
lifehackerhansol 2024-03-14 11:24:28 -07:00
parent 95111d6d98
commit c04a362616
No known key found for this signature in database
GPG Key ID: 80FB184AFC0B3B0E
2 changed files with 2 additions and 1 deletions

View File

@ -10,6 +10,7 @@ builds/finalize.romfs: builds
builds/finalize_helper.firm: builds/finalize.romfs
@cp finalize_helper.gm9 GodMode9/data/autorun.gm9
@sed -i s/FINALIZE_SHA256SUM/$(shell sha256sum $< | awk '{print $$1}')/g GodMode9/data/autorun.gm9
@$(MAKE) -C GodMode9 SCRIPT_RUNNER=1
@cp GodMode9/output/GodMode9.firm $@

View File

@ -76,7 +76,7 @@ if not find 0:/finalize.romfs NULL
poweroff
end
if not sha 0:/finalize.romfs 73F93573C74A7A9F6443C52AD6D4AD701485B55B48B008D3A3DBD1B2F651A999
if not sha 0:/finalize.romfs FINALIZE_SHA256SUM
set PREVIEW_MODE "Finalizing Setup Helper Script\n> Copying SD files... :("
echo "Error #22: finalize.romfs is invalid\n \nThe file finalize.romfs is corrupt or unreadable.\nRe-download it, copy it to root of SD, and try again."
poweroff