From 7d2c52b21ff28c80d28a1408cf6abb85d7725848 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Thu, 1 Apr 2021 14:33:30 +0200 Subject: added po-connect-4 markdown files for testing + todo --- scripts/meta | 10 +++++++--- scripts/postinfo | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'scripts') 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)" \ -- cgit v1.2.3