diff options
author | Patrick Spek <p.spek@tyil.nl> | 2024-01-04 11:39:09 +0100 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2024-01-04 11:39:09 +0100 |
commit | 3675d3806f772bf864446dc091b1bbbe6ebf233a (patch) | |
tree | d70ff4b0684223a3c29a0bc101cdfb2993003c7c /lib/util.bash | |
parent | 6d214faf3505f9bb065e6c75b9056c271ae68f79 (diff) |
Fix values with = being used for templating
Diffstat (limited to 'lib/util.bash')
-rw-r--r-- | lib/util.bash | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/util.bash b/lib/util.bash index 7bc8a6d..ad84247 100644 --- a/lib/util.bash +++ b/lib/util.bash @@ -162,18 +162,18 @@ file_template() do debug "bashtard/template" "Adding $kv to sedfile at $sedfile" - key="$(awk -F= '{ print $1 }' <<< "$kv")" + key="$(cut -d'=' -f -1 <<< "$kv")" if [[ -z "$key" ]] then - crit "bashtard/template" "Empty key in '$kv' while rendering $file?" + crit "bashtard/template" "Empty key in '$kv' while rendering $file" fi - value="$(awk -F= '{ print $NF }' <<< "$kv")" + value="$(cut -d'=' -f 2- <<< "$kv")" if [[ -z "$value" ]] then - crit "bashtard/template" "Empty key in '$kv' while rendering $file?" + crit "bashtard/template" "Empty key in '$kv' while rendering $file" fi # shellcheck disable=SC2016 |