diff options
author | Martin Stjernholm <mast@google.com> | 2021-04-16 20:45:03 +0100 |
---|---|---|
committer | Martin Stjernholm <mast@google.com> | 2021-04-19 18:32:00 +0100 |
commit | 2b8d923a09a56087a6ac4654691f4a27e53444af (patch) | |
tree | 9304774a52973d15d0790982510829507d74d5ed /envsetup.sh | |
parent | 2c80511bd60b2f9844fb49d7152f7c265cbe7155 (diff) |
Allow selecting a different product in banchan.
Necessary since the products used for APEX modules are different in
internal builds.
Test: banchan com.android.art
Test: banchan com.android.art arm
Test: banchan com.android.art art_module_arm
Test: banchan com.android.art module_arm
Test: banchan com.android.art x86_64
Test: banchan com.android.art art_module_x86_64
Bug: 179779520
Change-Id: Ib59a86b70e409537aaad7258465b6874b589b858
Diffstat (limited to 'envsetup.sh')
-rw-r--r-- | envsetup.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/envsetup.sh b/envsetup.sh index f4e5f4ee6e..e4b547cdf9 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -799,17 +799,19 @@ function tapas() function banchan() { local showHelp="$(echo $* | xargs -n 1 echo | \grep -E '^(help)$' | xargs)" - local arch="$(echo $* | xargs -n 1 echo | \grep -E '^(arm|x86|arm64|x86_64)$' | xargs)" + local product="$(echo $* | xargs -n 1 echo | \grep -E '^(.*_)?(arm|x86|arm64|x86_64)$' | xargs)" local variant="$(echo $* | xargs -n 1 echo | \grep -E '^(user|userdebug|eng)$' | xargs)" - local apps="$(echo $* | xargs -n 1 echo | \grep -E -v '^(user|userdebug|eng|arm|x86|arm64|x86_64)$' | xargs)" + local apps="$(echo $* | xargs -n 1 echo | \grep -E -v '^(user|userdebug|eng|(.*_)?(arm|x86|arm64|x86_64))$' | xargs)" if [ "$showHelp" != "" ]; then $(gettop)/build/make/banchanHelp.sh return fi - if [ $(echo $arch | wc -w) -gt 1 ]; then - echo "banchan: Error: Multiple build archs supplied: $arch" + if [ -z "$product" ]; then + product=arm + elif [ $(echo $product | wc -w) -gt 1 ]; then + echo "banchan: Error: Multiple build archs or products supplied: $products" return fi if [ $(echo $variant | wc -w) -gt 1 ]; then @@ -821,8 +823,8 @@ function banchan() return fi - local product=module_arm - case $arch in + case $product in + arm) product=module_arm;; x86) product=module_x86;; arm64) product=module_arm64;; x86_64) product=module_x86_64;; |