From d8eae6f0572630d39c3c4f03cbb8c0896d451a6f Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Thu, 23 Nov 2023 20:05:54 -0800 Subject: [PATCH] fix fetching mentions when no webmention file exists --- scripts/get-webmentions.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/get-webmentions.sh b/scripts/get-webmentions.sh index b01a0ab..a94984a 100644 --- a/scripts/get-webmentions.sh +++ b/scripts/get-webmentions.sh @@ -82,6 +82,10 @@ fetch_webmentions() { } # fetch webmentions if we don't have a fresh copy already. -if ! check_cached_webmentions "$stale_after_minutes"; then +if [ -f "$webmentions_file" ]; then + if ! check_cached_webmentions "$stale_after_minutes"; then + fetch_webmentions + fi +else fetch_webmentions fi