summaryrefslogtreecommitdiff
path: root/include/vendor.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-04-12 17:02:07 +0100
committerLeah Rowe <leah@libreboot.org>2025-04-12 17:02:07 +0100
commit0d85f061e2ee191b23ecef86af9e14135a94f89e (patch)
treef6e26f92121f52af580c68824075505e3d811a15 /include/vendor.sh
parent61f201410288748e4bb0f4f5664490bd7eb7c090 (diff)
vendor.sh: tidy up patch_release_roms()
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/vendor.sh')
-rw-r--r--include/vendor.sh25
1 files changed, 5 insertions, 20 deletions
diff --git a/include/vendor.sh b/include/vendor.sh
index c2b1c112..ff5e6e51 100644
--- a/include/vendor.sh
+++ b/include/vendor.sh
@@ -491,13 +491,10 @@ patch_release_roms()
tmpromdir="tmp/DO_NOT_FLASH/bin/$board"
remkdir "${tmpromdir%"/bin/$board"}"
- tar -xf "$archive" -C "${tmpromdir%"/bin/$board"}" || \
- $err "Can't extract '$archive'"
+ x_ tar -xf "$archive" -C "${tmpromdir%"/bin/$board"}"
for _hashes in $hashfiles; do
- [ -L "$tmpromdir/$_hashes" ] && \
- $err "'$archive' -> the hashfile is a symlink. $dontflash"
- [ -f "$tmpromdir/$_hashes" ] && has_hashes="y" && \
+ e "$tmpromdir/$_hashes" f && has_hashes="y" && \
hashfile="$_hashes" && break; :
done
@@ -534,31 +531,19 @@ patch_release_roms()
fi
) || $err "'$archive' -> Can't verify vendor hashes. $dontflash"
- if [ -n "$new_mac" ]; then
- if ! modify_mac_addresses; then
- printf "\nNo GbE region defined for '%s'\n" "$board" \
- 1>&2
- printf "Therefore, changing the MAC is impossible.\n" \
- 1>&2
- printf "This board probably lacks Intel ethernet.\n" \
- 1>&2
- printf "(or it's pre-IFD Intel with Intel GbE NIC)\n" \
- 1>&2
- fi
- fi
+ [ -z "$new_mac" ] || modify_mac_addresses || printf \
+ "\nNo GbE region defined for '%s'\n" "$board" 1>&2
[ "$xchanged" = "y" ] || rm -Rf "$tmpromdel" || :
[ "$xchanged" = "y" ] || return 0
(
cd "${tmpromdir%"/bin/$board"}" || \
$err "Can't cd '${tmpromdir%"/bin/$board"}'; $dontflash"
- # ../../ is the root of lbmk
mkrom_tarball "bin/$board"
) || $err "Cannot re-generate '$archive' - $dontflash"
mv "${tmpromdir%"/bin/$board"}/bin/${relname}_${board}.tar.xz" \
- "$archive" || \
- $err "'$archive' -> Cannot overwrite - $dontflash"; :
+ "$archive" || $err "'$archive' -> Can't overwrite - $dontflash"; :
}
process_release_rom()