Skip to content

Commit 8f715c0

Browse files
committed
remove not needed global
1 parent 1e1c76a commit 8f715c0

File tree

5 files changed

+8
-22
lines changed

5 files changed

+8
-22
lines changed

parse-config.sh

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -30,38 +30,24 @@ load_dir() {
3030
# $3, is the numbers of characters to strip in front of the key
3131
KEY="${KEY:$3}"
3232

33-
# Removes the infrastructure.global prefix if it exists
33+
# Removes the infrastructure.global. prefix if it exists
3434
if [[ "$KEY" == "infrastructure.global."* ]]; then
3535
KEY=${KEY#"infrastructure.global."}
3636
fi
3737

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."}
4841
fi
4942

50-
# Removes the application.global prefix if it exists
43+
# Removes the application.global. prefix if it exists
5144
if [[ "$KEY" == "application.global."* ]]; then
5245
KEY=${KEY#"application.global."}
5346
fi
5447

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."}
6551
fi
6652

6753
# Removes the application.$application_name prefix if it exists

0 commit comments

Comments
 (0)