aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-04-01 14:33:30 +0200
committerlonkaars <l.leblansch@gmail.com>2021-04-01 14:33:30 +0200
commit7d2c52b21ff28c80d28a1408cf6abb85d7725848 (patch)
tree2abdf8abdb7a5dac3ec3df36d497431283f86397 /scripts
parentd2d813c04ce37cdb4a283dcd60b7986882970be5 (diff)
added po-connect-4 markdown files for testing + todo
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/meta10
-rwxr-xr-xscripts/postinfo2
2 files changed, 8 insertions, 4 deletions
diff --git a/scripts/meta b/scripts/meta
index f33ea3d..e869d0b 100755
--- a/scripts/meta
+++ b/scripts/meta
@@ -11,8 +11,12 @@ if [[ $tag_name = "tags" ]]; then
sed -z '$ s/\n$//' |\
jq --raw-input --slurp 'split("\n")'
else
- echo $output |\
- sed -z '$ s/\n$//' |\
- jq --raw-input
+ if [[ $output = "" ]]; then
+ echo "" | jq --raw-input
+ else
+ echo $output |\
+ sed -z '$ s/\n$//' |\
+ jq --raw-input
+ fi
fi
diff --git a/scripts/postinfo b/scripts/postinfo
index 94827f1..72c6526 100755
--- a/scripts/postinfo
+++ b/scripts/postinfo
@@ -3,7 +3,7 @@
filename=$1
jq -n \
- --argjson title "$(./meta title $filename)" \
+ --argjson title "$(./meta title $filename || '\n')" \
--argjson subtitle "$(./meta subtitle $filename)" \
--argjson author "$(./meta author $filename)" \
--argjson date "$(./meta date $filename)" \