home · contact · privacy
Add feed link to index template.
[redo-blog] / processor / feed.xml.do
index 2b4396957954b5eab9c021a0d3695c1fb2a7dfcb..717fa89c9590c96afdb645f4860288649e2e4067 100644 (file)
@@ -1,8 +1,8 @@
 #!/bin/sh
 
 # Pull in global dependencies.
-metadata_dir=.meta
-. "$metadata_dir"/helpers.sh
+. ./helpers.sh
+metadata_dir=metadata
 author_file="$metadata_dir"/author
 uuid_file="$metadata_dir"/uuid
 title_file="$metadata_dir"/title
@@ -60,8 +60,10 @@ printf "<updated>%s</updated>\n\n" "$lastmod_rfc3339"
 
 # Write feed entries.
 for file in ./${tmp_snippets_dir}/*; do
-  cat "${file}"
-  printf "\n"
+  if [ -e "$file" ]; then
+    cat "${file}"
+    printf "\n"
+  fi
 done
 rm -rf "$tmp_snippets_dir"