Skip to content

Commit fd7a7de

Browse files
committed
Fix get from conf func
1 parent 0513682 commit fd7a7de

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sh/prepare.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ export LOCAL_GID="$(id -g)"
1515

1616
get_from_conf() {
1717
if [[ -f "${conf}" ]]; then
18-
grep -Ei "^${1}( |=)" "${conf}" | grep -Po '(?<=").*(?=")'
18+
grep -Ei "^${1}( |=)" "${conf}" |
19+
grep -Po '(?<=\=)\s?.*' | grep -Po '[^=]+$' | xargs
1920
fi
2021
}
2122

@@ -45,6 +46,10 @@ for el in "${arr[@]}"; do
4546
upkey="$(echo "${key}" | sed -e 's/\(.*\)/\U\1/')"
4647
val="$(getval "${el}")"
4748
confval="$(get_from_conf "${key}")"
49+
50+
# echo $val
51+
echo $confval
52+
4853
if [[ -n "${confval}" ]]; then
4954
val="${confval}"
5055
fi

0 commit comments

Comments
 (0)