@@ -30,38 +30,24 @@ load_dir() {
30
30
# $3, is the numbers of characters to strip in front of the key
31
31
KEY=" ${KEY: $3 } "
32
32
33
- # Removes the infrastructure.global prefix if it exists
33
+ # Removes the infrastructure.global. prefix if it exists
34
34
if [[ " $KEY " == " infrastructure.global." * ]]; then
35
35
KEY=${KEY# " infrastructure.global." }
36
36
fi
37
37
38
- if [[ " $KEY " =~ infrastructure\. [^.]+\. global\. .+ ]]; then
39
- # Remove 'infrastructure.' prefix
40
- TEMP=${KEY# infrastructure.}
41
-
42
- # Split off the part after 'global.'
43
- PART_BEFORE_GLOBAL=${TEMP%% .global.* }
44
- PART_AFTER_GLOBAL=${TEMP#* .global.}
45
-
46
- # Combine the parts
47
- KEY=" ${PART_BEFORE_GLOBAL} .${PART_AFTER_GLOBAL} "
38
+ # Removes the infrastructure. prefix if it exists
39
+ if [[ " $KEY " == " infrastructure." * ]]; then
40
+ KEY=${KEY# " infrastructure." }
48
41
fi
49
42
50
- # Removes the application.global prefix if it exists
43
+ # Removes the application.global. prefix if it exists
51
44
if [[ " $KEY " == " application.global." * ]]; then
52
45
KEY=${KEY# " application.global." }
53
46
fi
54
47
55
- if [[ " $KEY " =~ application\. [^.]+\. global\. .+ ]]; then
56
- # Remove 'application.' prefix
57
- TEMP=${KEY# application.}
58
-
59
- # Split off the part after 'global.'
60
- PART_BEFORE_GLOBAL=${TEMP%% .global.* }
61
- PART_AFTER_GLOBAL=${TEMP#* .global.}
62
-
63
- # Combine the parts
64
- KEY=" ${PART_BEFORE_GLOBAL} .${PART_AFTER_GLOBAL} "
48
+ # Removes the application. prefix if it exists
49
+ if [[ " $KEY " == " application." * ]]; then
50
+ KEY=${KEY# " application." }
65
51
fi
66
52
67
53
# Removes the application.$application_name prefix if it exists
0 commit comments