From 8c5f78d3d3255d96e0349e5a92f281b99ea54b7b Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sat, 29 Jun 2024 03:27:31 +0100 Subject: vendor.sh: condense inject() a bit Signed-off-by: Leah Rowe --- include/vendor.sh | 9 +++------ 1 file 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" -- cgit v1.2.1