diff options
| author | Paul Buetow <paul@buetow.org> | 2022-08-28 10:17:08 +0100 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2022-08-28 10:17:08 +0100 |
| commit | 072e1eef2e56f28a4b9c0540e5bd31a8002592d1 (patch) | |
| tree | 0eb8a65252a0a7c4512f2eeef2901d83ec68c054 /lib/gemfeed.source.sh | |
| parent | 35213c97cebe88d413c33ec9b2f4e03a7dc7f3ce (diff) | |
then there are no notes and no feeds dont process them
Diffstat (limited to 'lib/gemfeed.source.sh')
| -rw-r--r-- | lib/gemfeed.source.sh | 7 |
1 files changed, 6 insertions, 1 deletions
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 > "$gemfeed_dir/index.gmi.tmp" |
