diff options
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 |