Ian Jauslin
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorIan Jauslin <ian.jauslin@rutgers.edu>2023-03-21 20:13:35 -0400
committerIan Jauslin <ian.jauslin@rutgers.edu>2023-03-21 20:13:35 -0400
commit70bba87946c263d6c92545107e3d9f45f8d9c9df (patch)
tree2c86818518e5c98efa3ded730e67253dddce203d /bin
parentaacbf51475e48941e6323b641ffb86600809738f (diff)
Update to v2.2:HEADv2.2master
New: Allow for the value of other entries to be in the 'sed' command of a filter. (May break existing configurations in cases where sed command uses a '%'.)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/BBlog7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/BBlog b/bin/BBlog
index 0c8b525..d646cd9 100755
--- a/bin/BBlog
+++ b/bin/BBlog
@@ -1,6 +1,6 @@
#!/bin/bash
-## Copyright Ian Jauslin 2015-2022
+## Copyright Ian Jauslin 2015-2023
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
enginedir=/usr/share/BBlog/engines
# version
-version=2.1.5
+version=2.2
function print_config {
echo "engine: $engine"
@@ -222,7 +222,8 @@ function replace_format {
# apply filter
if [ -n "$filter" ]; then
- sed_cmd=$(eval "echo \$filter_$filter")
+ # replace '%' inside filter text
+ sed_cmd=$(replace_format $(eval "echo \$filter_$filter"))
replacement=$(eval "echo \$$field" | sed -r "$sed_cmd" )
else
replacement=$(eval "echo \$$field")