From 4cbc950c01fadd09b408de873cbb7a221b64bea9 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 5 May 2025 06:00:23 +0100 Subject: inject.sh: Move FSP extraction only to extract_fsp Don't do FSP-specific extraction in extract_archive, as that is not what the latter is for. Signed-off-by: Leah Rowe --- include/inject.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'include/inject.sh') diff --git a/include/inject.sh b/include/inject.sh index c6c8c2d2..bdccb881 100644 --- a/include/inject.sh +++ b/include/inject.sh @@ -1,4 +1,4 @@ -# SPDX-License-Identifier: GPL-3.0-only +# SPD-License-Identifier: GPL-3.0-only # Copyright (c) 2022 Caleb La Grange # Copyright (c) 2022 Ferass El Hafidi # Copyright (c) 2023-2025 Leah Rowe @@ -121,10 +121,10 @@ fetch() x_ mkdir -p "${_dest%/*}" remkdir "$appdir" - extract_archive "$_dl" "$appdir" "$dl_type" || \ + [ "$dl_type" = "fsp" ] || extract_archive "$_dl" "$appdir" || \ [ "$dl_type" = "e6400vga" ] || err "$_dest $dl_type: !extract" - eval "extract_$dl_type" + x_ extract_$dl_type "$_dl" "$appdir" set -u -e e "$_dest" f missing && err "!extract_$dl_type. $dontflash"; : } @@ -191,10 +191,6 @@ extract_intel_me_bruteforce() extract_archive() { - [ $# -gt 2 ] && [ "$3" = "fsp" ] && x_ python \ - "$cbdir/3rdparty/fsp/Tools/SplitFspBin.py" split -f "$1" -o "$2" \ - -n "Fsp.fd" && return 0 - innoextract "$1" -d "$2" || python "$pfs_extract" "$1" -e || 7z x \ "$1" -o"$2" || unar "$1" -o "$2" || unzip "$1" -d "$2" || return 1 @@ -261,7 +257,8 @@ copy_tbfw() extract_fsp() { - x_ cp "$appdir/"Fsp_*.fd "${_dest%/*}" + x_ python "$cbdir/3rdparty/fsp/Tools/SplitFspBin.py" split -f "$1" \ + -o "$2" -n "Fsp.fd" && x_ cp "$appdir/"Fsp_*.fd "${_dest%/*}" } fail_inject() -- cgit v1.2.1