summaryrefslogtreecommitdiffstats
path: root/xci/files/xci-lib.sh
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2018-04-06 20:33:11 +0100
committerMarkos Chandras <mchandras@suse.de>2018-05-18 11:20:53 +0100
commit91b17d42fb68b7223196240e0ee0f33cce8928e7 (patch)
treec3640acfa5045f323444cc6bbf8fad587c3ff8ba /xci/files/xci-lib.sh
parentf95ad15a811c3111b42c09f569d0f1f303a8b597 (diff)
xci: file: xci-lib.sh: Avoid sourcing xci-lib.sh twice
The file can be sourced from multiple places so we need to avoid sourcing it twice. Change-Id: I7d47f3d7e461d90d5456c95a1f7a791b4e3a2bde Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'xci/files/xci-lib.sh')
-rw-r--r--xci/files/xci-lib.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/xci/files/xci-lib.sh b/xci/files/xci-lib.sh
index bdb64513..542ac3ab 100644
--- a/xci/files/xci-lib.sh
+++ b/xci/files/xci-lib.sh
@@ -7,6 +7,9 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+# Avoid double sourcing the file
+[[ -n ${XCI_LIB_SOURCED:-} ]] && return 0 || export XCI_LIB_SOURCED=1
+
function bootstrap_xci_env() {
# Declare our virtualenv
export XCI_VENV=${XCI_PATH}/venv/