2 # Walks your %_topdir (or any other dir specified by $1) and checks with pldnotify.awk for updates
3 # and shows only relevant diffs of those packages only.
5 # Setup your cron to give you work early morning :)
6 # 6 30 * * * /some/path/pldnotify.sh
8 # Idea based on PLD-doc/notify-specsupdate.sh script
9 # Author: Elan Ruusamäe <glen@pld-linux.org>
13 topdir=${1:-$(rpm -E %_topdir)}
14 pldnotify=${0%/*}/pldnotify.awk
17 # run pldnotify with debug mode if this script executed with "-x"
25 local prefix="[$(date '+%Y-%m-%d %H:%M:%S')] pldnotify: "
26 local msg="$prefix"$(echo "$*" | tr -d '\r\n')
29 echo >&2 -ne "\033]1;$msg\007\033]2;$msg\007"
32 echo >&2 -ne "\033]0;$msg\007"
38 xtitle "Checking packages in $topdir/*"
39 for spec in $topdir/*/*.spec; do
42 xtitle "Checking $pkg"
43 out=$($pldnotify -vDEBUG=$debug < $spec); rc=$?
49 echo "$out" | grep -v "seems ok" || :