diff --git a/build/envsetup.sh b/build/envsetup.sh index 22a6f6dc..3adae2e4 100644 --- a/build/envsetup.sh +++ b/build/envsetup.sh @@ -63,11 +63,12 @@ function breakfast() if [ -z "$variant" ]; then variant="userdebug" fi - lunch lineage_$target-$variant - if [ $? -ne 0 ]; then - # try CM + + if ! check_product lineage_$target && check_product cm_$target; then echo "** Warning: '$target' is using CM-based makefiles. This will be deprecated in the next major release." lunch cm_$target-$variant + else + lunch lineage_$target-$variant fi fi fi