diff --git a/envsetup.sh b/envsetup.sh index a9bd707c02..f4c65664ce 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -570,7 +570,8 @@ function tapas() { local arch="$(echo $* | xargs -n 1 echo | \grep -E '^(arm|x86|mips|armv5|arm64|x86_64|mips64)$' | 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|mips|armv5|arm64|x86_64|mips64)$' | xargs)" + local density="$(echo $* | xargs -n 1 echo | \grep -E '^(ldpi|mdpi|tvdpi|hdpi|xhdpi|xxhdpi|xxxhdpi|alldpi)$' | xargs)" + local apps="$(echo $* | xargs -n 1 echo | \grep -E -v '^(user|userdebug|eng|arm|x86|mips|armv5|arm64|x86_64|mips64|ldpi|mdpi|tvdpi|hdpi|xhdpi|xxhdpi|xxxhdpi|alldpi)$' | xargs)" if [ $(echo $arch | wc -w) -gt 1 ]; then echo "tapas: Error: Multiple build archs supplied: $arch" @@ -580,6 +581,10 @@ function tapas() echo "tapas: Error: Multiple build variants supplied: $variant" return fi + if [ $(echo $density | wc -w) -gt 1 ]; then + echo "tapas: Error: Multiple densities supplied: $density" + return + fi local product=full case $arch in @@ -599,6 +604,7 @@ function tapas() export TARGET_PRODUCT=$product export TARGET_BUILD_VARIANT=$variant + export TARGET_BUILD_DENSITY=$density export TARGET_BUILD_TYPE=release export TARGET_BUILD_APPS=$apps