summaryrefslogtreecommitdiffstats
path: root/envsetup.sh
diff options
context:
space:
mode:
authorJoe Onorato <joeo@android.com>2009-04-29 15:56:47 -0700
committerJoe Onorato <joeo@android.com>2009-04-29 17:14:16 -0700
commit8849aedde07373948b45a55703e7764de0a7199d (patch)
treef9ee5e892b2071f20259b297b6813445a270ee20 /envsetup.sh
parentb4abfb91bf1519af1e2826cc2246f324c06a983c (diff)
downloadbuild-8849aedde07373948b45a55703e7764de0a7199d.zip
build-8849aedde07373948b45a55703e7764de0a7199d.tar.gz
build-8849aedde07373948b45a55703e7764de0a7199d.tar.bz2
Slim down chooseproduct (used by choosecombo).
People keep getting confused by the default products in this list, which are almost never what they want, because this list roughly corresponds to the DEVICES and not the PRODUCTS. Now that lunch works again, I'm not too worried about choosecombo except for the couple of cases lunch can't handle, like the simulator. Therefore, this change just removes the list of suggested products, and you have to know which one you're trying to build (which seems like a resonable prerequisite).
Diffstat (limited to 'envsetup.sh')
-rw-r--r--envsetup.sh34
1 files changed, 1 insertions, 33 deletions
diff --git a/envsetup.sh b/envsetup.sh
index f8f20ab..b8045a5 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -289,30 +289,6 @@ function choosetype()
#
function chooseproduct()
{
- # Find the makefiles that must exist for a product.
- # Send stderr to /dev/null in case partner isn't present.
- local -a choices
- choices=(`/bin/ls build/target/board/*/BoardConfig.mk vendor/*/*/BoardConfig.mk 2> /dev/null`)
-
- local choice
- local -a prodlist
- for choice in ${choices[@]}
- do
- # The product name is the name of the directory containing
- # the makefile we found, above.
- prodlist=(${prodlist[@]} `dirname ${choice} | xargs basename`)
- done
-
- local index=1
- local p
- echo "Product choices are:"
- for p in ${prodlist[@]}
- do
- echo " $index. $p"
- let "index = $index + 1"
- done
-
-
if [ "x$TARGET_PRODUCT" != x ] ; then
default_value=$TARGET_PRODUCT
else
@@ -327,8 +303,7 @@ function chooseproduct()
local ANSWER
while [ -z "$TARGET_PRODUCT" ]
do
- echo "You can also type the name of a product if you know it."
- echo -n "Which would you like? [$default_value] "
+ echo -n "Which product would you like? [$default_value] "
if [ -z "$1" ] ; then
read ANSWER
else
@@ -338,13 +313,6 @@ function chooseproduct()
if [ -z "$ANSWER" ] ; then
export TARGET_PRODUCT=$default_value
- elif (echo -n $ANSWER | grep -q -e "^[0-9][0-9]*$") ; then
- local poo=`echo -n $ANSWER`
- if [ $poo -le ${#prodlist[@]} ] ; then
- export TARGET_PRODUCT=${prodlist[$(($ANSWER-$_arrayoffset))]}
- else
- echo "** Bad product selection: $ANSWER"
- fi
else
if check_product $ANSWER
then