home
·
contact
·
privacy
projects
/
redo-blog
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13dfbc0
)
To feed generator, add handler for case of empty blog.
author
Christian Heller
<c.heller@plomlompom.de>
Mon, 2 Jan 2017 10:38:20 +0000
(11:38 +0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Mon, 2 Jan 2017 10:38:20 +0000
(11:38 +0100)
processor/feed.xml.do
patch
|
blob
|
history
diff --git
a/processor/feed.xml.do
b/processor/feed.xml.do
index 717fa89c9590c96afdb645f4860288649e2e4067..0bc7318b0dc881bd094b81a17254d1977a5d48a8 100644
(file)
--- a/
processor/feed.xml.do
+++ b/
processor/feed.xml.do
@@
-47,7
+47,11
@@
for file in ./*.rst ./*.md; do
done
# Derive feed modification date from snippets.
-mod_dates=$(grep -hE "^<updated>" ./${metadata_dir}/*.feed_snippet | sed -E 's/<.?updated>//g')
+n_snippet_files=`ls -1 ./${metadata_dir}/*.feed_snippet 2>/dev/null | wc -l`
+if [ $n_snippet_files != 0 ]
+then
+ mod_dates=$(grep -hE "^<updated>" ./${metadata_dir}/*.feed_snippet | sed -E 's/<.?updated>//g')
+fi
last_mod_unix=0
for date in $mod_dates; do
date_unix=$(date -u "+%s" -d "${date}")