diff --git a/envsetup.sh b/envsetup.sh index 8a995c7fdc..a8b224d55e 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -746,7 +746,9 @@ function tapas() local arch="$(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 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|arm64|x86_64|ldpi|mdpi|tvdpi|hdpi|xhdpi|xxhdpi|xxxhdpi|alldpi)$' | xargs)" + local keys="$(echo $* | xargs -n 1 echo | \grep -E '^(devkeys)$' | xargs)" + local apps="$(echo $* | xargs -n 1 echo | \grep -E -v '^(user|userdebug|eng|arm|x86|arm64|x86_64|ldpi|mdpi|tvdpi|hdpi|xhdpi|xxhdpi|xxxhdpi|alldpi|devkeys)$' | xargs)" + if [ "$showHelp" != "" ]; then $(gettop)/build/make/tapasHelp.sh @@ -765,6 +767,10 @@ function tapas() echo "tapas: Error: Multiple densities supplied: $density" return fi + if [ $(echo $keys | wc -w) -gt 1 ]; then + echo "tapas: Error: Multiple keys supplied: $keys" + return + fi local product=aosp_arm case $arch in @@ -772,6 +778,10 @@ function tapas() arm64) product=aosp_arm64;; x86_64) product=aosp_x86_64;; esac + if [ -n "$keys" ]; then + product=${product/aosp_/aosp_${keys}_} + fi; + if [ -z "$variant" ]; then variant=eng fi diff --git a/tapasHelp.sh b/tapasHelp.sh index 0f461304a3..7cb5f2c0fd 100755 --- a/tapasHelp.sh +++ b/tapasHelp.sh @@ -6,7 +6,7 @@ SCRIPT_DIR="${PWD}" cd ../.. TOP="${PWD}" -message='usage: tapas [ ...] [arm|x86|arm64|x86_64] [eng|userdebug|user] +message='usage: tapas [ ...] [arm|x86|arm64|x86_64] [eng|userdebug|user] [devkeys] tapas selects individual apps to be built by the Android build system. Unlike "lunch", "tapas" does not request the building of images for a device.