summaryrefslogtreecommitdiffstats
path: root/envsetup.sh
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2010-06-15 15:43:13 -0700
committerYing Wang <wangying@google.com>2010-06-15 15:43:13 -0700
commitf9cd36a0f71c78e20f5ff24f9dd48af17d741cb6 (patch)
treeab4d96dd45044d9d4f2303ceafa6c0010e56ba35 /envsetup.sh
parent8004266329761dcb8545d23200a5baa747cedd1f (diff)
parent56791ebe2622ba223ddde214f9b1c3f495191921 (diff)
downloadbuild-f9cd36a0f71c78e20f5ff24f9dd48af17d741cb6.zip
build-f9cd36a0f71c78e20f5ff24f9dd48af17d741cb6.tar.gz
build-f9cd36a0f71c78e20f5ff24f9dd48af17d741cb6.tar.bz2
resolved conflicts for merge of 56791ebe to master
Change-Id: I7463636796f1262fd92af839102dc58d562259f7
Diffstat (limited to 'envsetup.sh')
-rw-r--r--envsetup.sh45
1 files changed, 36 insertions, 9 deletions
diff --git a/envsetup.sh b/envsetup.sh
index 902b054..b170f8c 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -56,6 +56,7 @@ function check_product()
CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core \
TARGET_PRODUCT=$1 TARGET_BUILD_VARIANT= \
TARGET_SIMULATOR= TARGET_BUILD_TYPE= \
+ TARGET_BUILD_APPS= \
get_build_var TARGET_DEVICE > /dev/null
# hide successful answers, but allow the errors to show
}
@@ -150,9 +151,14 @@ function set_sequence_number()
function settitle()
{
if [ "$STAY_OFF_MY_LAWN" = "" ]; then
- local product=$(get_build_var TARGET_PRODUCT)
- local variant=$(get_build_var TARGET_BUILD_VARIANT)
- export PROMPT_COMMAND="echo -ne \"\033]0;[${product}-${variant}] ${USER}@${HOSTNAME}: ${PWD}\007\""
+ local product=$TARGET_PRODUCT
+ local variant=$TARGET_BUILD_VARIANT
+ local apps=$TARGET_BUILD_APPS
+ if [ -z "$apps" ]; then
+ export PROMPT_COMMAND="echo -ne \"\033]0;[${product}-${variant}] ${USER}@${HOSTNAME}: ${PWD}\007\""
+ else
+ export PROMPT_COMMAND="echo -ne \"\033]0;[$apps $variant] ${USER}@${HOSTNAME}: ${PWD}\007\""
+ fi
fi
}
@@ -376,11 +382,6 @@ function choosevariant()
done
}
-function tapas()
-{
- choosecombo
-}
-
function choosecombo()
{
choosesim $1
@@ -432,7 +433,6 @@ function print_lunch_menu()
echo
echo "You're building on" $uname
echo
- echo ${LUNCH_MENU_CHOICES[@]}
echo "Lunch menu... pick a combo:"
local i=1
@@ -484,6 +484,8 @@ function lunch()
return 1
fi
+ export TARGET_BUILD_APPS=
+
# special case the simulator
if [ "$selection" = "simulator" ]
then
@@ -530,6 +532,31 @@ function lunch()
printconfig
}
+# Configures the build to build unbundled apps.
+# Run tapas with one ore more app names (from LOCAL_PACKAGE_NAME)
+function tapas()
+{
+ local variant=$(echo -n $(echo $* | xargs -n 1 echo | grep -E '^(user|userdebug|eng)$'))
+ local apps=$(echo -n $(echo $* | xargs -n 1 echo | grep -E -v '^(user|userdebug|eng)$'))
+
+ if [ $(echo $variant | wc -w) -gt 1 ]; then
+ echo "tapas: Error: Multiple build variants supplied: $variant"
+ return
+ fi
+ if [ -z "$variant" ]; then
+ variant=eng
+ fi
+
+ export TARGET_PRODUCT=generic
+ export TARGET_BUILD_VARIANT=$variant
+ export TARGET_SIMULATOR=false
+ export TARGET_BUILD_TYPE=release
+ export TARGET_BUILD_APPS=$apps
+
+ set_stuff_for_environment
+ printconfig
+}
+
function gettop
{
local TOPFILE=build/core/envsetup.mk