#!/bin/sh
#
# script to create your bugs rdf
#

now=`date +%s`
last=`/usr/bin/stat --format=%X /usr/sbin/apt-listbugs`
time=`expr $now - $last`

# don't use apt-listbugs recently 20 hours
if test $time -gt `expr 1200 \* 60` ; then
  apt-get -s dist-upgrade | grep Inst | cut -d' ' -f2 | xargs /usr/sbin/apt-listbugs -I -l -g rss > /dev/null 2> /dev/null
fi

exit 0
