mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 14:02:52 +02:00
vendor.sh: break up the extract_kbc1126 subshell
stick it in a new function, for easier reading. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+27
-24
@@ -313,30 +313,8 @@ extract_archive()
|
||||
|
||||
extract_kbc1126ec()
|
||||
{
|
||||
(
|
||||
x_ cd "$appdir/"
|
||||
|
||||
if mv Rompaq/68*.BIN ec.bin; then
|
||||
:
|
||||
elif unar -D ROM.CAB Rom.bin; then
|
||||
:
|
||||
elif unar -D Rom.CAB Rom.bin; then
|
||||
:
|
||||
elif unar -D 68*.CAB Rom.bin; then
|
||||
:
|
||||
else
|
||||
err "!kbc1126 unar" "extract_kbc1126ec" "$@"
|
||||
fi
|
||||
|
||||
if [ ! -f "ec.bin" ]; then
|
||||
x_ mv Rom.bin ec.bin
|
||||
fi
|
||||
|
||||
if x_ e ec.bin f; then
|
||||
x_ "$kbc1126_ec_dump" ec.bin
|
||||
fi
|
||||
|
||||
) || err "$board: can't extract kbc1126 fw" "extract_kbc1126ec" "$@"
|
||||
( extract_kbc1126ec_dump ) || \
|
||||
err "$board: can't extract kbc1126 fw" "extract_kbc1126ec" "$@"
|
||||
|
||||
# throw error if either file is missing
|
||||
x_ e "$appdir/ec.bin.fw1" f
|
||||
@@ -345,6 +323,31 @@ extract_kbc1126ec()
|
||||
x_ cp "$appdir/"ec.bin.fw* "${_pre_dest%/*}/"
|
||||
}
|
||||
|
||||
extract_kbc1126ec_dump()
|
||||
{
|
||||
x_ cd "$appdir/"
|
||||
|
||||
if mv Rompaq/68*.BIN ec.bin; then
|
||||
:
|
||||
elif unar -D ROM.CAB Rom.bin; then
|
||||
:
|
||||
elif unar -D Rom.CAB Rom.bin; then
|
||||
:
|
||||
elif unar -D 68*.CAB Rom.bin; then
|
||||
:
|
||||
else
|
||||
err "!kbc1126 unar" "extract_kbc1126ec" "$@"
|
||||
fi
|
||||
|
||||
if [ ! -f "ec.bin" ]; then
|
||||
x_ mv Rom.bin ec.bin
|
||||
fi
|
||||
|
||||
if x_ e ec.bin f; then
|
||||
x_ "$kbc1126_ec_dump" ec.bin
|
||||
fi
|
||||
}
|
||||
|
||||
extract_e6400vga()
|
||||
{
|
||||
set +u +e
|
||||
|
||||
Reference in New Issue
Block a user