On 2011/08/17 09:16, Amit Kulkarni wrote:
> > IMO it's part of a maintainer's job to subscribe to the relevant
> > announcement mailing lists and/or check the web page for updates (I have
> > a script which checks a bunch of pages like this, where the relevant
> > project has no announcement list or where they have one but don't use
> > it reliably).
>
> can you please share this?
>
> thanks
this is what I have at the moment, it's pretty awful and I'm sure
there's a better program to do it and various improvements that could
be made, but it was quicker to bodge something together than search
for one.
#!/bin/sh
TMPFILE=`mktemp` || exit 1
TMPFILE2=`mktemp` || exit 1
HASH=`echo "$1" | sha1`
curl $1 2>/dev/null \
| grep -aviE '(form_build|Downloads YTD|Forum Threads|Forum
Posts|document.write|var.addy_text|form_token|indexterm|comments|quer.*second|200[89]|201[01]|script.*packaged|served.in.*sec|Members.*strong|^$|]]><!--|adlog.php|link.type.*stylesheet|^[0-9
]*$|script.type.*gstatic|[0-9]* days
ago|=function|script.*text/java|assetHostPath)' \
>> $TMPFILE
if ! diff -au0 /var/db/checkwww/$HASH.last $TMPFILE > $TMPFILE2; then
mv $TMPFILE /var/db/checkwww/$HASH.last
echo "$1 changed:"
cat $TMPFILE2
fi
[ -r $TMPFILE ] && rm $TMPFILE
[ -r $TMPFILE2 ] && rm $TMPFILE2