xref: /aosp_15_r20/build/bazel/mk2rbc/replace_dynamic_qcpath.sh (revision 7594170e27e0732bc44b93d1440d87a54b6ffe7c)
1#! /bin/bash
2##CL Provide location hint for the dynamically calculated paths.
3##CL
4##CL For the paths using QC_PROP_PATH or QC_PROP_ROOT
5##CL Bug: 203582721
6##CL Test: treehugger
7declare -r files="$(grep -rlP '^ *(\$\(call inherit-product|-?include).*\$\(QC_PROP_(PATH|ROOT)\)' --include 'BoardConfig*.mk')"
8[[ -z "$files" ]] || sed -i -r -f <(cat <<"EOF"
9/^ *(\$\(call inherit-product|-?include).*\$\(QC_PROP_(PATH|ROOT)\)/i#RBC# include_top vendor/qcom
10EOF
11) $files
12