refactor(build): share the ISO download/verify step (FR-095) - #45
Avicennasis wants to merge 1 commit into
Conversation
build-rescue-usb.sh and build-wipe-usb.sh carried the same download_iso() curl+gpg block. Move it to bin/lib/iso-lib.sh and source it from both.
Avicennasis
left a comment
There was a problem hiding this comment.
The runtime extraction appears behavior-preserving, and bash -n passes, but it regresses the repository's own lint script. ./tests/shellcheck.sh now reports six new warnings from the extraction: SC2034 for SYSRESCUE_SIG_URL and sig_path in each caller, plus SC2154 for iso_path and sig_path in bin/lib/iso-lib.sh. (The three warnings in autorun/wipe-lib.sh already exist on main.)
Please make the shared interface statically explicit—preferably pass the paths/URLs/key/version as function arguments—or add narrowly justified ShellCheck source/global annotations so this refactor adds no lint debt. git diff --check and GitHub's CodeQL/release-drafter checks are green, but GitHub currently does not run this repo's shell test/lint script.
Closes #48087. Extracts the identical
download_iso()(cached ISO fetch + detached-signature verification) frombuild-rescue-usb.shandbuild-wipe-usb.shintobin/lib/iso-lib.sh, sourced by both.bash -nclean on all three.