feat: expand ~ to $HOME in the yaml parser

This commit is contained in:
Martin Wimpress 2024-07-25 08:52:01 +01:00 committed by Martin Wimpress
commit c78953780a
2 changed files with 2 additions and 1 deletions

View file

@ -47,6 +47,7 @@ function parse_yaml() {
fs=$'\034'
sed -ne "s|^\(${s}\):|\1|" \
-e 's|`||g;s|\$||g;' \
-e "s|~|${HOME}|g;" \
-e "s|^\(${s}\)\(${w}\)${s}:${s}[\"']\(.*\)[\"']$s\$|\1${fs}\2${fs}\3|p" \
-e "s|^\(${s}\)\(${w}\)${s}:${s}\(.*\)${s}\$|\1${fs}\2${fs}\3|p" "${1}" |
awk -F"${fs}" '{

View file

@ -4,7 +4,7 @@ server:
app: sprout
key: "create your key with uuidgen here"
archive_stream: false
archive_path: "${HOME}/Streams"
archive_path: ~/Streams
services:
trovo: