about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2022-07-19 10:18:08 -0500
committerCase Duckworth2022-07-19 10:18:08 -0500
commitb2c2289db5843eba96f3ed5e8097552c6776e746 (patch)
tree4cc44314a64c318d438a3fb872521d2181795db3
parentUse gawk due to unportable bits (diff)
downloadsfeed-b2c2289db5843eba96f3ed5e8097552c6776e746.tar.gz
sfeed-b2c2289db5843eba96f3ed5e8097552c6776e746.zip
Use temp files
-rwxr-xr-xrunsfeed15
1 files changed, 10 insertions, 5 deletions
diff --git a/runsfeed b/runsfeed index 0e076d1..a08f1a3 100755 --- a/runsfeed +++ b/runsfeed
@@ -29,15 +29,20 @@ main() {
29 log Updating urls... 29 log Updating urls...
30 update_urls "$sfeedrc" 30 update_urls "$sfeedrc"
31 log Generating HTML... 31 log Generating HTML...
32 html "$sfeedpath"/* >"$SFEED_OUTPUT/index.html" 32 html "$sfeedpath"/* >/tmp/sfeed-index.html &&
33 mv /tmp/sfeed-index.html "$SFEED_OUTPUT/index.html"
33 log 34 log
34 LIMIT=0 html "$sfeedpath"/* >"$SFEED_OUTPUT/feeds.html" 35 LIMIT=0 html "$sfeedpath"/* >/tmp/sfeed-feeds.html &&
36 mv /tmp/sfeed-feeds.html "$SFEED_OUTPUT/feeds.html"
35 log 37 log
36 log Generating RSS... 38 log Generating RSS...
37 atom "$sfeedpath" >"$SFEED_OUTPUT/feeds.xml" 39 atom "$sfeedpath" >/tmp/feeds.xml &&
38 atom "$sfeedpath" 7 >"$SFEED_OUTPUT/feeds-short.xml" 40 mv /tmp/feeds.xml "$SFEED_OUTPUT/feeds.xml"
41 atom "$sfeedpath" 7 >/tmp/feeds-short.xml &&
42 mv /tmp/feeds-short.xml "$SFEED_OUTPUT/feeds-short.xml"
39 log Generating OPML... 43 log Generating OPML...
40 opml "$sfeedrc" >"$SFEED_OUTPUT/feeds.opml" 44 opml "$sfeedrc" >/tmp/feeds.opml &&
45 mv /tmp/feeds.opml "$SFEED_OUTPUT/feeds.opml"
41 # log Archiving old feeds... 46 # log Archiving old feeds...
42 # archive "$sfeedpath"/* 47 # archive "$sfeedpath"/*
43 log Done. 48 log Done.