summaryrefslogtreecommitdiff
path: root/rbesetup.sh
diff options
context:
space:
mode:
author Kousik Kumar <kousikk@google.com> 2021-07-12 13:55:13 -0400
committer Kousik Kumar <kousikk@google.com> 2021-07-14 11:31:54 -0400
commit721533e0d6c558083732f6a811085d1803529b3f (patch)
tree7163ecbcedd2fec2aa4a5e249f6935554145a9f4 /rbesetup.sh
parent663d0ffddef2d8b92048e02b93a9c92a2e319a2d (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: Ran forrest build with fix for previous build failure - https://android-build.googleplex.com/builds/abtd/run/L72300000950316038 Bug: b/193407413 Change-Id: I16f057086e2ee4f5918816ea70dbb33d0f5e99ab
Diffstat (limited to 'rbesetup.sh')
-rw-r--r--rbesetup.sh7
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.