Build: Add support for specifying build variant in brunch/breakfast
This little modification allows specifying build variant in brunch/breakfast commands. For example we can use "brunch i9300 user" to build user variant instead of default userdebug.
When no extra argument is given, userdebug is default.
Change-Id: I2d438209f8a14949c64baa66485c811da384d20b
diff --git a/build/envsetup.sh b/build/envsetup.sh
index 5655d62..917dbed 100644
--- a/build/envsetup.sh
+++ b/build/envsetup.sh
@@ -26,6 +26,7 @@
function breakfast()
{
target=$1
+ local variant=$2
CUSTOM_DEVICES_ONLY="true"
unset LUNCH_MENU_CHOICES
add_lunch_combo full-eng
@@ -46,7 +47,10 @@
lunch $target
else
# This is probably just the omni model name
- lunch omni_$target-userdebug
+ if [ -z "$variant" ]; then
+ variant="userdebug"
+ fi
+ lunch omni_$target-$variant
fi
fi
return $?