cd $1
UNMATCHED=`diff <(find . -print0 | xargs -0 -L 1 basename | sort | uniq) <(egrep -R -o -e "iconUrl\\s*:\\s*['\"]icon://.+['\"]" ./src | egrep -o "icon://.+['\"]" | cut -b 8- | sed s/\[\"\'\]/\.png/ | sed '/amazon-store.png/d;' | sort | uniq) | grep '>' | cut -b 2-`

if !( test -z "$UNMATCHED" ); then
    echo "missing icons:" $UNMATCHED
    exit 1
fi
