diff --git a/vendorsetup.sh b/vendorsetup.sh index bc95f5c134..6c328b8203 100755 --- a/vendorsetup.sh +++ b/vendorsetup.sh @@ -11,6 +11,7 @@ tmp_lunch=`mktemp` sed '/ lunch()/,/^}/!d' build/envsetup.sh | sed 's/function lunch/function aosp_lunch/' > ${tmp_lunch} source ${tmp_lunch} rm -f ${tmp_lunch} + # Override lunch function to filter lunch targets function lunch { @@ -19,30 +20,8 @@ function lunch echo "[lunch] Couldn't locate the top of the tree. Try setting TOP." >&2 return fi - local answer=' ' - # Set the TARGET_RELEASE variable to the release_config for - # which we want to build CELADON. It should be one among - # $(TOP)/build/release/release_configs/* - # When updating TARGET_RELEASE value here please change in - # "function _get_build_var_cached" below too. - TARGET_RELEASE=ap4a - if [ "$1" ]; then - local valid_targets=`mixinup -t` - local count=`echo "$1" | grep -o "-" | wc -l` - if [ "${count}" -eq 1 ]; then - local array=(${1/-/ }) - local target=${array[0]} - if [[ "${valid_targets}" =~ "${target}" ]]; then - answer=${target}-$TARGET_RELEASE-${array[1]} - else - answer=$1 - fi - else - answer=$1 - fi - fi - aosp_lunch $answer + aosp_lunch $* rm -rf vendor/intel/utils/Android.mk vendor/intel/utils_priv/Android.mk vendor/intel/utils/autopatch.sh @@ -56,12 +35,8 @@ function lunch } # Get the exact value of a build variable. -function _get_build_var_cached() +function get_build_var() { - # Set the TARGET_RELEASE variable to the release_config for - # which we want to build CELADON. It should be one among - # $(TOP)/build/release/release_configs/* - TARGET_RELEASE=ap4a if [ "$1" = "COMMON_LUNCH_CHOICES" ] then valid_targets=`mixinup -t` @@ -71,8 +46,7 @@ function _get_build_var_cached() array=(${t/-/ }) target=${array[0]} if [[ "${valid_targets}" =~ "$target" ]]; then - tgt=$target-$TARGET_RELEASE-${array[1]} - LUNCH_MENU_CHOICES+=($tgt) + LUNCH_MENU_CHOICES+=($t) fi done echo ${LUNCH_MENU_CHOICES[@]}