#!/bin/bash
# runs feedlint on everything

for f in *.xml; do
    if echo $f | grep -q proto; then
        echo "Skip prototype $f."
    else
        if grep -q "\<archive.*sourceforge" < $f; then
            if grep -q \<feed < $f; then
                echo "No check, contains includes: $f"
            else
                0launch -c 'http://0install.net/2007/interfaces/FeedLint.xml' $f -o $* || exit $?
            fi
        else
            0launch -c 'http://0install.net/2007/interfaces/FeedLint.xml' $f $* || exit $?
        fi
    fi
done
