From e90657cc734057bc947a5dbcb953b9b450597ce0 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 13 Apr 2025 14:09:31 +0100 Subject: vendor.sh: Don't handle vendor files if not needed This should speed up automated tests. Otherwise, it goes through all the extra checks that aren't needed, for each individual type of vendor file, and also errors out when handling pico serprog images; during automated testing, on the bin directory, you might try on every tarball, one of which is the pico tarball and this patch makes lbmk skip that one too. In general, we must not perform unnecessary tasks. Doing so may even cause other bugs that we couldn't easily detect. Signed-off-by: Leah Rowe --- include/vendor.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/vendor.sh b/include/vendor.sh index 3693b5dc..412105c7 100644 --- a/include/vendor.sh +++ b/include/vendor.sh @@ -364,7 +364,9 @@ vendor_inject() readcfg && need_files="y" if [ "$need_files" = "y" ] || [ -n "$new_mac" ]; then - [ "$nukemode" = "nuke" ] || x_ ./mk download "$board" + if [ "$nukemode" != "nuke" ] && [ "$need_files" = "y" ]; then + x_ ./mk download "$board" + fi patch_release_roms fi [ "$need_files" != "y" ] && printf \ @@ -460,6 +462,7 @@ patch_release_roms() x_ tar -xf "$archive" -C "${tmpromdir%"/bin/$board"}" for _hashes in $hashfiles; do + [ "$need_files" = "y" ] || break e "$tmpromdir/$_hashes" f && has_hashes="y" && \ hashfile="$_hashes" && break; : done @@ -486,6 +489,7 @@ patch_release_roms() fi ( + [ "$need_files" = "y" ] || exit 0 cd "$tmpromdir" || $err "patch '$archive': can't cd $tmpromdir" # NOTE: For compatibility with older rom releases, defer to sha1 if [ "$has_hashes" = "y" ] && [ "$nukemode" != "nuke" ]; then -- cgit v1.2.1