summaryrefslogtreecommitdiff
path: root/lib/atomfeed.source.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/atomfeed.source.sh')
-rw-r--r--lib/atomfeed.source.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/atomfeed.source.sh b/lib/atomfeed.source.sh
index 65afa5a..7e7124d 100644
--- a/lib/atomfeed.source.sh
+++ b/lib/atomfeed.source.sh
@@ -143,6 +143,13 @@ ATOMENTRY
</feed>
ATOMFOOTER
+ if [ -n "$XMLLINT" ]; then
+ log INFO 'XMLLinting Atom feed'
+ $XMLLINT "$atom_file.tmp" >/dev/null ||
+ log PANIC "Atom feed $atom_file.tmp isn't valid XML, please re-try"
+ log INFO 'Atom feed is OK'
+ fi
+
# Delete the 3rd line of the atom feeds (global feed update timestamp)
if ! diff -u <($SED 3d "$atom_file") <($SED 3d "$atom_file.tmp"); then
log INFO 'Feed got something new!'