summaryrefslogtreecommitdiff
path: root/envsetup.sh
diff options
context:
space:
mode:
author Sam Lewis <samclewis@google.com> 2024-09-23 20:06:02 +0000
committer Sam Lewis <samclewis@google.com> 2024-09-23 20:06:02 +0000
commit2404c4a30eb70ccef23d3798192c4681ba50af82 (patch)
tree2adc3b47ffed3063e4cbe86e1c7eb15ec3362360 /envsetup.sh
parent4c068a1b6703dd50ae1167ebf479b530b4ac0879 (diff)
Move cog setup logic into shell_utils so it can be used when any of these commands are run:
- `m` - `lunch` - `source build/envsetup.sh` this will set up the symlink properly regardless of the order of commands so users don't get stuck with a broken build Bug: 362337892 Change-Id: Ibd3b262107dfc1024cd83ab8aeb33a299fb0ffb2
Diffstat (limited to 'envsetup.sh')
-rw-r--r--envsetup.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/envsetup.sh b/envsetup.sh
index 06dadd3f38..3fed5aed6d 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -442,6 +442,7 @@ function print_lunch_menu()
function lunch()
{
local answer
+ setup_cog_env_if_needed
if [[ $# -gt 1 ]]; then
echo "usage: lunch [target]" >&2
@@ -1079,10 +1080,7 @@ function source_vendorsetup() {
done
done
- if [[ "${PWD}" == /google/cog/* ]]; then
- f="build/make/cogsetup.sh"
- echo "including $f"; . "$T/$f"
- fi
+ setup_cog_env_if_needed
}
function showcommands() {