mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 14:02:52 +02:00
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 <leah@libreboot.org>
This commit is contained in:
+5
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user