diff options
| author | Paul Buetow <paul@buetow.org> | 2023-03-12 12:10:11 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2023-03-12 12:10:11 +0200 |
| commit | 921a1067f48b4c044335601610b6ba704aaa3cf9 (patch) | |
| tree | 192ddcde314ff680158e70e4ed1d0b17e955bb22 /lib/atomfeed.source.sh | |
| parent | b66ab729a7e90d67d3b802f9c1a4d2b91b0683c8 (diff) | |
add xmllint support
Diffstat (limited to 'lib/atomfeed.source.sh')
| -rw-r--r-- | lib/atomfeed.source.sh | 7 |
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!' |
