From c78953780a9e0d17ffa7fbca8fdca94fa1237603 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Thu, 25 Jul 2024 08:52:01 +0100 Subject: [PATCH] feat: expand ~ to $HOME in the yaml parser --- stream-sprout | 1 + stream-sprout.yaml.example | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/stream-sprout b/stream-sprout index ae1ad03..69e2bd7 100755 --- a/stream-sprout +++ b/stream-sprout @@ -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}" '{ diff --git a/stream-sprout.yaml.example b/stream-sprout.yaml.example index 3bd0920..86d5d77 100644 --- a/stream-sprout.yaml.example +++ b/stream-sprout.yaml.example @@ -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: