diff options
| author | Ian Jauslin <ian.jauslin@rutgers.edu> | 2023-03-21 20:13:35 -0400 | 
|---|---|---|
| committer | Ian Jauslin <ian.jauslin@rutgers.edu> | 2023-03-21 20:13:35 -0400 | 
| commit | 70bba87946c263d6c92545107e3d9f45f8d9c9df (patch) | |
| tree | 2c86818518e5c98efa3ded730e67253dddce203d /bin | |
| parent | aacbf51475e48941e6323b641ffb86600809738f (diff) | |
  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-x | bin/BBlog | 7 | 
1 files changed, 4 insertions, 3 deletions
| @@ -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") | 
