vendor.sh: make the fsp hack a bit cleaner

it's still a dirty hack. i really should make
a better check here.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-10-04 08:12:24 +01:00
parent 70cdb03f7f
commit 0776eb414c

View File

@@ -182,16 +182,27 @@ fetch()
remkdir "${_pre_dest%/*}" "$appdir"
# HACK: if grabbing fsp from coreboot, fix the path for lbmk
if [ "$dl_type" = "fsp" ]; then
if [ "$dl_type" = "fsp" ]
then
dl="${dl##*../}"
_cdp="$dl"
[ -f "$_cdp" ] || _cdp="$cbdir/$_cdp"; :
[ -f "$_cdp" ] && dl="$_cdp"; :
if [ ! -f "$_cdp" ]; then
_cdp="$cbdir/$_cdp"
fi
if [ -f "$_cdp" ]; then
dl="$_cdp"
fi
dl_bkup="${dl_bkup##*../}"
_cdp="$dl_bkup"
[ -f "$_cdp" ] || _cdp="$cbdir/$_cdp"; :
[ -f "$_cdp" ] && dl_bkup="$_cdp"; :
if [ ! -f "$_cdp" ]; then
_cdp="$cbdir/$_cdp"
fi
if [ -f "$_cdp" ]; then
dl_bkup="$_cdp"; :
fi
fi
# download the file (from the internet) to extract from: