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 a4fd76b..284c9ae 100644
--- a/build/envsetup.sh
+++ b/build/envsetup.sh
@@ -212,6 +212,7 @@
function breakfast()
{
target=$1
+ local variant=$2
BLISS_DEVICES_ONLY="true"
unset LUNCH_MENU_CHOICES
add_lunch_combo full-eng
@@ -232,7 +233,10 @@
lunch $target
else
# This is probably just the bliss model name
- lunch bliss_$target-userdebug
+ if [ -z "$variant" ]; then
+ variant="userdebug"
+ fi
+ lunch bliss_$target-$variant
fi
fi
return $?