From 0776eb414c82cff51a25fdbcbaed8368cfa05a9f Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sat, 4 Oct 2025 08:12:24 +0100 Subject: 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 --- include/vendor.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/vendor.sh b/include/vendor.sh index 6dd84f6a..020be698 100644 --- a/include/vendor.sh +++ b/include/vendor.sh @@ -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: -- cgit v1.2.1