diff options
author | 2021-07-12 13:55:13 -0400 | |
---|---|---|
committer | 2021-07-12 14:05:13 -0400 | |
commit | 9aa9e47b8c3921037f779453341ae1a822d454ce (patch) | |
tree | 4db0ebe47c469fbcd49e2dfd44a9ae17eb8d7d5d /rbesetup.sh | |
parent | 37557784fde4deb3e263246a142fde2ec970dc60 (diff) |
Add the ability to source RBE related scripts from envsetup.sh
This is so that developers don't have to remember to source a separate
script to source RBE related variables.
I'll modify the docs once this change is submitted.
Test:
USE_RBE=true source build/envsetup.sh sources RBE variables.
USE_RBE=false source build/envsetup.sh does NOT source RBE variables.
source build/envsetup.sh does NOT source RBE variables.
Bug: b/193407413
Change-Id: Ib8abf4c307b02fbb0c63b8a62d7aeda8be42d0fb
Diffstat (limited to 'rbesetup.sh')
-rw-r--r-- | rbesetup.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/rbesetup.sh b/rbesetup.sh index ec39e6ef17..3b0e7cf7dc 100644 --- a/rbesetup.sh +++ b/rbesetup.sh @@ -24,8 +24,11 @@ function _source_env_setup_script() { } # This function needs to run first as the remaining defining functions may be -# using the envsetup.sh defined functions. -_source_env_setup_script || return +# using the envsetup.sh defined functions. Skip this part if this script is already +# being invoked from envsetup.sh. +if [[ "$1" != "--skip-envsetup" ]]; then + _source_env_setup_script || return +fi # This function prefixes the given command with appropriate variables needed # for the build to be executed with RBE. |