From 072e1eef2e56f28a4b9c0540e5bd31a8002592d1 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 28 Aug 2022 10:17:08 +0100 Subject: then there are no notes and no feeds dont process them --- lib/gemfeed.source.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/gemfeed.source.sh') diff --git a/lib/gemfeed.source.sh b/lib/gemfeed.source.sh index aee70d3..8eaeb95 100644 --- a/lib/gemfeed.source.sh +++ b/lib/gemfeed.source.sh @@ -24,12 +24,17 @@ gemfeed::updatemainindex () { gemfeed::_get_word_count () { local -r gmi_file="$1"; shift - $SED '/^```/,/^```/d' "$gmi_file" | wc -w + sed '/^```/,/^```/d' "$gmi_file" | wc -w | cut -d' ' -f1 } # Generate a index.gmi in the ./gemfeed subdir. gemfeed::generate () { local -r gemfeed_dir="$CONTENT_BASE_DIR/gemtext/gemfeed" + if [ ! -d "$gemfeed_dir" ]; then + log INFO "Capsule without Gemfeed" + return + fi + log INFO "Generating Gemfeed index for $gemfeed_dir" cat < "$gemfeed_dir/index.gmi.tmp" -- cgit v1.2.3