summaryrefslogtreecommitdiff
path: root/lib/atomfeed.source.sh
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2023-03-12 12:10:11 +0200
committerPaul Buetow <paul@buetow.org>2023-03-12 12:10:11 +0200
commit921a1067f48b4c044335601610b6ba704aaa3cf9 (patch)
tree192ddcde314ff680158e70e4ed1d0b17e955bb22 /lib/atomfeed.source.sh
parentb66ab729a7e90d67d3b802f9c1a4d2b91b0683c8 (diff)
add xmllint support
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!'