extract_files: Match non-treble path prefixes
Some devices put stuff on /system, /system/vendor or even
/system/vendor/odm. Search for these paths too when generating
TARGET_COPY_OUT_$partition variables.
Change-Id: Ie2c087e57aaca02d5ea93f290d5fc50d1315a600
diff --git a/extract_utils.sh b/extract_utils.sh
index c9550ac..a3f1364 100644
--- a/extract_utils.sh
+++ b/extract_utils.sh
@@ -275,11 +275,11 @@
fi
TARGET=$(target_file "$FILE")
- if prefix_match_file "vendor/" $TARGET ; then
+ if prefix_match_file "product/" $TARGET ; then
local OUTTARGET=$(truncate_file $TARGET)
- printf ' %s/proprietary/%s:$(TARGET_COPY_OUT_VENDOR)/%s%s\n' \
+ printf ' %s/proprietary/%s:$(TARGET_COPY_OUT_PRODUCT)/%s%s\n' \
"$OUTDIR" "$TARGET" "$OUTTARGET" "$LINEEND" >> "$PRODUCTMK"
- elif prefix_match_file "product/" $TARGET ; then
+ elif prefix_match_file "system/product/" $TARGET ; then
local OUTTARGET=$(truncate_file $TARGET)
printf ' %s/proprietary/%s:$(TARGET_COPY_OUT_PRODUCT)/%s%s\n' \
"$OUTDIR" "$TARGET" "$OUTTARGET" "$LINEEND" >> "$PRODUCTMK"
@@ -287,6 +287,22 @@
local OUTTARGET=$(truncate_file $TARGET)
printf ' %s/proprietary/%s:$(TARGET_COPY_OUT_ODM)/%s%s\n' \
"$OUTDIR" "$TARGET" "$OUTTARGET" "$LINEEND" >> "$PRODUCTMK"
+ elif prefix_match_file "vendor/odm/" $TARGET ; then
+ local OUTTARGET=$(truncate_file $TARGET)
+ printf ' %s/proprietary/%s:$(TARGET_COPY_OUT_ODM)/%s%s\n' \
+ "$OUTDIR" "$TARGET" "$OUTTARGET" "$LINEEND" >> "$PRODUCTMK"
+ elif prefix_match_file "system/vendor/odm/" $TARGET ; then
+ local OUTTARGET=$(truncate_file $TARGET)
+ printf ' %s/proprietary/%s:$(TARGET_COPY_OUT_ODM)/%s%s\n' \
+ "$OUTDIR" "$TARGET" "$OUTTARGET" "$LINEEND" >> "$PRODUCTMK"
+ elif prefix_match_file "vendor/" $TARGET ; then
+ local OUTTARGET=$(truncate_file $TARGET)
+ printf ' %s/proprietary/%s:$(TARGET_COPY_OUT_VENDOR)/%s%s\n' \
+ "$OUTDIR" "$TARGET" "$OUTTARGET" "$LINEEND" >> "$PRODUCTMK"
+ elif prefix_match_file "system/vendor/" $TARGET ; then
+ local OUTTARGET=$(truncate_file $TARGET)
+ printf ' %s/proprietary/%s:$(TARGET_COPY_OUT_VENDOR)/%s%s\n' \
+ "$OUTDIR" "$TARGET" "$OUTTARGET" "$LINEEND" >> "$PRODUCTMK"
elif prefix_match_file "system/" $TARGET ; then
local OUTTARGET=$(truncate_file $TARGET)
printf ' %s/proprietary/%s:$(TARGET_COPY_OUT_SYSTEM)/%s%s\n' \