summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-06-29 03:27:31 +0100
committerLeah Rowe <leah@libreboot.org>2024-06-29 03:27:31 +0100
commit8c5f78d3d3255d96e0349e5a92f281b99ea54b7b (patch)
treea2301628611e4d592dcefeaf497f1e27e4ffb39b
parent42925ce79fb31699256cc924ba359e0f6c37e713 (diff)
vendor.sh: condense inject() a bit
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-xinclude/vendor.sh9
1 files changed, 3 insertions, 6 deletions
diff --git a/include/vendor.sh b/include/vendor.sh
index 49de3df9..3dda3f42 100755
--- a/include/vendor.sh
+++ b/include/vendor.sh
@@ -353,13 +353,10 @@ inject()
[ "$nukemode" = "nuke" ] || "$ifdtool" -i $_t:$_dest "$rom" \
-O "$rom" || $err "failed: inject '$_t' '$_dest' on '$rom'"
[ "$nukemode" != "nuke" ] || "$ifdtool" --nuke $_t "$rom" \
- -O "$rom" || $err "inject $rom: can't nuke $_t in IFD"
- return 0
- fi
- if [ "$nukemode" = "nuke" ]; then
+ -O "$rom" || $err "$rom: can't nuke $_t in IFD"; return 0
+ elif [ "$nukemode" = "nuke" ]; then
"$cbfstool" "$rom" remove -n "$cbfsname" || \
- $err "inject $rom: can't remove $cbfsname"
- return 0
+ $err "inject $rom: can't remove $cbfsname"; return 0
fi
[ "$_t" != "stage" ] || "$cbfstool" "$rom" add-stage -f \
"$_dest" -n "$cbfsname" -t stage -c lzma || $err "$rom: !add ref"