diff options
| author | Leah Rowe <leah@libreboot.org> | 2025-05-04 08:50:23 +0100 | 
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2025-05-04 08:50:23 +0100 | 
| commit | b19c4f8f674b04fdaa0b07b2c43766a76545ed09 (patch) | |
| tree | c7bf41b5e07c995e35addfdc335359cadcda0e69 /include/inject.sh | |
| parent | 439020fbda5ca7862bf2eaf4d59ab68aae230c33 (diff) | |
inject.sh: tidy up TBFW handling
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/inject.sh')
| -rw-r--r-- | include/inject.sh | 12 | 
1 files changed, 3 insertions, 9 deletions
| diff --git a/include/inject.sh b/include/inject.sh index d956cdd1..837f34c1 100644 --- a/include/inject.sh +++ b/include/inject.sh @@ -256,20 +256,14 @@ extract_sch5545ec()  # https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/thinkpad-t-series-laptops/thinkpad-t480-type-20l5-20l6/20l5/solutions/ht508988  extract_tbfw()  { -	chkvars TBFW_size -	fe_ copy_tbfw "$appdir" -type f -name "TBT.bin" +	chkvars TBFW_size && fe_ copy_tbfw "$appdir" -type f -name "TBT.bin"  	[ -f "$_dest" ] || $err "$board: Could not extract tbfw"; :  }  copy_tbfw()  { -	[ -f "$1" ] || return 0 -	[ -L "$1" ] && return 0 - -	x_ dd if=/dev/null of="$1" bs=1 seek=$TBFW_size -	x_ mv "$1" "$_dest" - -	return 1 +	[ -f "$1" ] && [ ! -L "$1" ] && x_ dd if=/dev/null of="$1" bs=1 \ +	    seek=$TBFW_size && x_ mv "$1" "$_dest" && return 1; :  }  extract_fsp() | 
