about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xrunsfeed6
1 files changed, 4 insertions, 2 deletions
diff --git a/runsfeed b/runsfeed index f987a92..e6714a7 100755 --- a/runsfeed +++ b/runsfeed
@@ -27,6 +27,8 @@ main() {
27 atom "$sfeedpath" 7 >"$SFEED_OUTPUT/feeds-short.xml" 27 atom "$sfeedpath" 7 >"$SFEED_OUTPUT/feeds-short.xml"
28 log Generating OPML... 28 log Generating OPML...
29 opml "$sfeedrc" >"$SFEED_OUTPUT/feeds.opml" 29 opml "$sfeedrc" >"$SFEED_OUTPUT/feeds.opml"
30 log Archiving old feeds...
31 archive "$sfeedpath"/*
30 log Done. 32 log Done.
31} 33}
32 34
@@ -63,9 +65,9 @@ atom() ( # atom DIRECTORY [DAYS]
63 sfeed_atom 65 sfeed_atom
64) 66)
65 67
66sfeed_archive() ( # sfeed_archive FEED ... 68archive() ( # sfeed_archive FEED ...
67 for feed; do 69 for feed; do
68 awk -v old="$(($(date +%s) - (15 * 24 * 3600)))" \ 70 awk -v old="$(($(date +%s) - (60 * 24 * 3600)))" \
69 -F '\t' 'int($1) > old' <"$feed" >"$feed.new" 71 -F '\t' 'int($1) > old' <"$feed" >"$feed.new"
70 mv "$feed" "$feed.old" 72 mv "$feed" "$feed.old"
71 mv "$feed.new" "$feed" 73 mv "$feed.new" "$feed"