aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/fetch.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/fetch.sh b/scripts/fetch.sh
index 767898d..3218862 100644
--- a/scripts/fetch.sh
+++ b/scripts/fetch.sh
@@ -69,7 +69,9 @@ is_xml() {
if [ ! -f "$1" ]; then return 1; fi
# dependencies=file, need another option if possible
- if [ -n "$(grep '^<rss version' $1)" ]; then return 0; fi
+ isAtom=$(grep '^<feed xmlns' $1 | grep -i 'atom')
+ isRss=$(grep '^<rss version' $1)
+ if [ -n "$isRss" -o -n "$isAtom" ]; then return 0; fi
# get mime/encoding
local mime=$(file --mime-type --mime-encoding $1)