Skip to content

Commit 4d22325

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Add header guard to functions/functions-common"
2 parents d103f47 + 4ffb454 commit 4d22325

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

functions

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
# - ``GLANCE_HOSTPORT``
1111
#
1212

13+
# ensure we don't re-source this in the same environment
14+
[[ -z "$_DEVSTACK_FUNCTIONS" ]] || return 0
15+
declare -r _DEVSTACK_FUNCTIONS=1
16+
1317
# Include the common functions
1418
FUNC_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") && pwd)
1519
source ${FUNC_DIR}/functions-common

functions-common

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@
3636
XTRACE=$(set +o | grep xtrace)
3737
set +o xtrace
3838

39+
# ensure we don't re-source this in the same environment
40+
[[ -z "$_DEVSTACK_FUNCTIONS_COMMON" ]] || return 0
41+
declare -r _DEVSTACK_FUNCTIONS_COMMON=1
42+
3943
# Global Config Variables
4044
declare -A GITREPO
4145
declare -A GITBRANCH

0 commit comments

Comments
 (0)