extract-utils: Prevent adding AB_OTA_PARTITIONS definition on non AB devices
Change-Id: I942639e5da7578cae2ef3fdf3a336ac073b280d3
diff --git a/extract_utils.sh b/extract_utils.sh
index 77dd774..fb94aa1 100644
--- a/extract_utils.sh
+++ b/extract_utils.sh
@@ -1341,7 +1341,10 @@
local FILELIST=(${PRODUCT_COPY_FILES_LIST[@]})
local COUNT=${#FILELIST[@]}
- printf '%s\n' "AB_OTA_PARTITIONS += \\" >> "$BOARDMK"
+ if [[ ${FILELIST[*]} =~ ";AB" ]]; then
+ printf '%s\n' "AB_OTA_PARTITIONS += \\" >> "$BOARDMK"
+ fi
+
for (( i=1; i<COUNT+1; i++ )); do
local DST_FILE=$(target_file "${FILELIST[$i-1]}")
local ARGS=$(target_args "${FILELIST[$i-1]}")