update-makefiles-helper.sh for vendor folders
Now update-makefiles-helper.sh also works for vendor folders.
Bug: 38216114
Test: ./hardware/interfaces/update-makefiles.sh works, generated
Android.bp files are identical w/wo this change.
/vendor/xxx/hardware/interfaces/update-makefiles.sh also works.
Change-Id: I85d5f0178a9147dac7034a74ec4bb5438267476f
diff --git a/update-makefiles-helper.sh b/update-makefiles-helper.sh
index 5e6284f..0460a41 100755
--- a/update-makefiles-helper.sh
+++ b/update-makefiles-helper.sh
@@ -54,10 +54,10 @@
#
# Usage: get_bp_dirs dir
function get_bp_dirs() {
- find $1/*/ \
+ find $1/* \
+ -mindepth 1 \
-name "Android.bp" \
- -printf "%h\n" \
- | cut -d "/" -f1-3 \
+ -printf "%H\n" \
| sort | uniq
}