Ian Jauslin
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorIan Jauslin <ian@jauslin.org>2019-11-05 18:37:38 -0500
committerIan Jauslin <ian@jauslin.org>2019-11-05 18:40:15 -0500
commit9eafbe43ebaef527c7ef712ba13bcbab002a9f3c (patch)
tree710b6cb5508f34e8ed2c735186f86c79b7884e73 /bin
parent4a8e51c3c9c604ba1ba5c3d798014d4265b5fdc1 (diff)
Update to v2.1.3:v2.1.3
Fixed: entries that contain a '%' do not cause a failure. New: access 'bibtex' entry in sqlite databases
Diffstat (limited to 'bin')
-rwxr-xr-xbin/BBlog13
1 files changed, 10 insertions, 3 deletions
diff --git a/bin/BBlog b/bin/BBlog
index bca1dc6..141b8a5 100755
--- a/bin/BBlog
+++ b/bin/BBlog
@@ -1,6 +1,6 @@
#!/bin/bash
-## Copyright Ian Jauslin 2015-2018
+## Copyright Ian Jauslin 2015-2019
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
@@ -15,10 +15,10 @@
## limitations under the License.
# directory containing the engine files
-enginedir=
+enginedir=/home/ian/Programs/BBlog2/src/engines
# version
-version=2.1.2
+version=2.1.3
function print_config {
echo "engine: $engine"
@@ -227,10 +227,17 @@ function replace_format {
else
replacement=$(eval "echo \$$field")
fi
+
+ # escape '%' in replacement
+ replacement="${replacement//\%/::iansays:percent::}"
+
out="${out//\%$command\%/$replacement}"
done
+ # un-escape '%' in replacement
+ out="${out//::iansays:percent::/\%}"
+
# finish replacing newlines
out="${out//\\n/%}"
out=$(echo "$out" | tr "%" "\n")