From 91b17d42fb68b7223196240e0ee0f33cce8928e7 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Fri, 6 Apr 2018 20:33:11 +0100 Subject: 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 --- xci/files/xci-lib.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xci/files/xci-lib.sh') 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/ -- cgit 1.2.3-korg