Ensure fastboot.zip is generated if necessary

As dtbo is necessary on avicii, hotdog, hotdogb, instantnoodle, instantnoodlep, kebab, lemonades, pro1x
Which all don't currently have a fastboo.zip provided

Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
Tad 2023-06-26 15:33:57 -04:00
parent 6b94c8cdcb
commit 0327a627cd
No known key found for this signature in database
GPG Key ID: B286E9F57A07424B
1 changed files with 4 additions and 2 deletions

View File

@ -332,7 +332,9 @@ processRelease() {
#Image
unzip -l $OUT_DIR/$PREFIX-target_files.zip | grep -q recovery.img;
local hasRecoveryImg="$?";
if [ "$hasRecoveryImg" == "1" ]; then
unzip -l $OUT_DIR/$PREFIX-target_files.zip | grep -q dtbo.img;
local hasDtboImg="$?";
if [ "$hasRecoveryImg" == "1" ] || [ "$hasDtboImg" == "0" ]; then
echo -e "\e[0;32mCreating fastboot image\e[0m";
"$RELEASETOOLS_PREFIX"img_from_target_files "$OUT_DIR/$PREFIX-target_files.zip" \
"$OUT_DIR/$PREFIX-fastboot.zip";
@ -368,7 +370,7 @@ processRelease() {
fi;
#Extract signed recovery
if [ "$hasRecoveryImg" == "0" ]; then
if [ "$hasRecoveryImg" == "0" ] && [ "$hasDtboImg" == "1" ]; then
echo -e "\e[0;32mExtracting signed recovery.img\e[0m";
mkdir "$OUT_DIR/rec_tmp";
unzip "$OUT_DIR/$PREFIX-target_files.zip" "IMAGES/recovery.img" -d "$OUT_DIR/rec_tmp";