diff options
author | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2011-01-31 00:49:49 +0000 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2015-10-06 16:09:33 -0700 |
commit | 8b2014d7e5c5e832240a37f417aac0bba22a4279 (patch) | |
tree | 268cedf17adf9daf125898ea4ab253b5095e0451 /envsetup.sh | |
parent | 780fb5fc8f4bfbff888a7ab08dd517befd970e60 (diff) | |
download | build-8b2014d7e5c5e832240a37f417aac0bba22a4279.zip build-8b2014d7e5c5e832240a37f417aac0bba22a4279.tar.gz build-8b2014d7e5c5e832240a37f417aac0bba22a4279.tar.bz2 |
Squashed commit of breakfast/brunch commands
Add a CM-specific breakfast menu
We usually don't wan't all the devices in the lunch menu, so
we can now choose to pick up breakfast or brunch and get a
smaller selection of devices (i.e., those we support)
Make brunch more nutritious
* "breakfast device-name" will set up the environment, just like lunch.
* "brunch device-name" will actually do the whole setup and build :)
brunch: add a lazier mode
Since all of CM's targets have a predictable PRODUCT_NAME and BUILD_VARIANT
(i.e., "cyanogen_$(PRODUCT_DEVICE)-eng"), brunch can now be invoked passing
just the PRODUCT_DEVICE ("brunch passion" for the N1 setup+build, for
example).
The "classic" long form of $(PRODUCT_NAME)-$(BUILD_VARIANT) can still be used
if desired ("brunch cyanogen_passion-eng" still works).
breakfast in bed
breakfast in bed (aliased to "bib") is the baconless friend of lazy
brunch.
You can now use "breakfast passion", or "bib passion", to setup the
corresponding CM build without actually building it
Fix breakfast for the undecided
The menu presentation (i.e., giving no arguments to breakfast
or brunch) was broken, so if you didn't know the name of your
target you weren't given a list to choose from, just an error.
Change-Id: I85b8217daa2d511c16a1e82c700e1b0fadbb36ac
CyanogenNom: Now moar helpful!
Diffstat (limited to 'envsetup.sh')
-rw-r--r-- | envsetup.sh | 56 |
1 files changed, 55 insertions, 1 deletions
diff --git a/envsetup.sh b/envsetup.sh index e1dd6ea..cf7b1a6 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -485,8 +485,15 @@ function print_lunch_menu() local uname=$(uname) echo echo "You're building on" $uname + if [ "$(uname)" = "Darwin" ] ; then + echo " (ohai, koush!)" + fi echo - echo "Lunch menu... pick a combo:" + if [ "z${CM_DEVICES_ONLY}" != "z" ]; then + echo "Breakfast menu... pick a combo:" + else + echo "Lunch menu... pick a combo:" + fi local i=1 local choice @@ -496,9 +503,56 @@ function print_lunch_menu() i=$(($i+1)) done + if [ "z${CM_DEVICES_ONLY}" != "z" ]; then + echo "... and don't forget the bacon!" + fi + echo } +function brunch() +{ + breakfast $* + if [ $? -eq 0 ]; then + mka bacon + else + echo "No such item in brunch menu. Try 'breakfast'" + return 1 + fi + return $? +} + +function breakfast() +{ + target=$1 + CM_DEVICES_ONLY="true" + unset LUNCH_MENU_CHOICES + add_lunch_combo full-eng + for f in `/bin/ls vendor/cm/vendorsetup.sh 2> /dev/null` + do + echo "including $f" + . $f + done + unset f + + if [ $# -eq 0 ]; then + # No arguments, so let's have the full menu + lunch + else + echo "z$target" | grep -q "-" + if [ $? -eq 0 ]; then + # A buildtype was specified, assume a full device name + lunch $target + else + # This is probably just the CM model name + lunch cm_$target-userdebug + fi + fi + return $? +} + +alias bib=breakfast + function lunch() { local answer |