diff options
author | Ian Jauslin <ian@jauslin.org> | 2019-11-13 11:22:41 -0500 |
---|---|---|
committer | Ian Jauslin <ian@jauslin.org> | 2019-11-13 11:22:41 -0500 |
commit | 2136ba3f69da0efe0eb2c8c960fc15d02331e358 (patch) | |
tree | 7611310bd354de9e6e296ce98c75f46aeac92fd4 /bin/BBlog | |
parent | 9eafbe43ebaef527c7ef712ba13bcbab002a9f3c (diff) |
Update to v2.1.4:v2.1.4
New: Allow for comma separated list of references in aux_cmd.
Diffstat (limited to 'bin/BBlog')
-rwxr-xr-x | bin/BBlog | 29 |
1 files changed, 16 insertions, 13 deletions
@@ -15,10 +15,10 @@ ## limitations under the License. # directory containing the engine files -enginedir=/home/ian/Programs/BBlog2/src/engines +enginedir=/usr/share/BBlog/engines # version -version=2.1.3 +version=2.1.4 function print_config { echo "engine: $engine" @@ -272,17 +272,20 @@ function inverse_map_citeref { foundref=0 # sift through aux file - grep -h "$aux_cmd" $aux | while read -r ref; do - eval "ref=\${ref#$aux_cmd}" - ref="${ref%\}}" - # replace the ref via the ref_map - possibleref=$(map_citeref "$ref") - # check whether the ref is the right one - if [ "$possibleref" = "$newref" ]; then - echo "$ref" - foundref=1 - return 1 - fi + grep -h "$aux_cmd" $aux | while read -r refs; do + eval "refs=\${refs#$aux_cmd}" + refs="${ref%\}}" + # can be a comma separated list + for ref in $(echo -n "$refs" | tr ',' '\n'); do + # replace the ref via the ref_map + possibleref=$(map_citeref "$ref") + # check whether the ref is the right one + if [ "$possibleref" = "$newref" ]; then + echo "$ref" + foundref=1 + return 1 + fi + done done && echo "$foundref$newref" } |