aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
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)" \