diff options
author | brian <brian@FreeBSD.org> | 2001-01-02 13:28:47 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2001-01-02 13:28:47 +0000 |
commit | a11ea16dad4881b8316db0c862fdf7762259dd86 (patch) | |
tree | fecd3c8366d0b0cba90d7e2f34b8da1d60793013 /etc/periodic | |
parent | 23f02b47229c11df6eb2c393e26aaf00fb66102f (diff) | |
download | FreeBSD-src-a11ea16dad4881b8316db0c862fdf7762259dd86.zip FreeBSD-src-a11ea16dad4881b8316db0c862fdf7762259dd86.tar.gz |
Understand ``multiple versions'' lines emitted from pkg_version.
Diffstat (limited to 'etc/periodic')
-rwxr-xr-x | etc/periodic/weekly/400.status-pkg | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/periodic/weekly/400.status-pkg b/etc/periodic/weekly/400.status-pkg index 050b47b..3bbe03f 100755 --- a/etc/periodic/weekly/400.status-pkg +++ b/etc/periodic/weekly/400.status-pkg @@ -17,7 +17,9 @@ case "$weekly_status_pkg_enable" in echo "Check for out of date packages:" rc=$(pkg_version -v | - sed -n 's/^\([^ ]*\) *< */ \1 /p' | + sed -n -e 's/^\([^ ]*\) *< */ \1 /p' \ + -e '/^[^-]*-\([^ ]*\) *\* *multiple versions.*[ ,]\1[,)].*/d' \ + -e 's/^\([^ ]*\) *\* *multiple versions.*\((.*\)/ \1 needs updating \2/p' | tee /dev/stderr | wc -l) [ $rc -gt 1 ] && rc=1;; |