From b2c2289db5843eba96f3ed5e8097552c6776e746 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 19 Jul 2022 10:18:08 -0500 Subject: Use temp files --- runsfeed | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'runsfeed') diff --git a/runsfeed b/runsfeed index 0e076d1..a08f1a3 100755 --- a/runsfeed +++ b/runsfeed @@ -29,15 +29,20 @@ main() { log Updating urls... update_urls "$sfeedrc" log Generating HTML... - html "$sfeedpath"/* >"$SFEED_OUTPUT/index.html" + html "$sfeedpath"/* >/tmp/sfeed-index.html && + mv /tmp/sfeed-index.html "$SFEED_OUTPUT/index.html" log - LIMIT=0 html "$sfeedpath"/* >"$SFEED_OUTPUT/feeds.html" + LIMIT=0 html "$sfeedpath"/* >/tmp/sfeed-feeds.html && + mv /tmp/sfeed-feeds.html "$SFEED_OUTPUT/feeds.html" log log Generating RSS... - atom "$sfeedpath" >"$SFEED_OUTPUT/feeds.xml" - atom "$sfeedpath" 7 >"$SFEED_OUTPUT/feeds-short.xml" + atom "$sfeedpath" >/tmp/feeds.xml && + mv /tmp/feeds.xml "$SFEED_OUTPUT/feeds.xml" + atom "$sfeedpath" 7 >/tmp/feeds-short.xml && + mv /tmp/feeds-short.xml "$SFEED_OUTPUT/feeds-short.xml" log Generating OPML... - opml "$sfeedrc" >"$SFEED_OUTPUT/feeds.opml" + opml "$sfeedrc" >/tmp/feeds.opml && + mv /tmp/feeds.opml "$SFEED_OUTPUT/feeds.opml" # log Archiving old feeds... # archive "$sfeedpath"/* log Done. -- cgit 1.4.1-21-gabe81