FIX in pkg_src_summary: I forgot that grep's exit status may be 1 which is fatal if 'set -e' pkg_cmp_summary: support for multi-variant package summaries. Option -m added for this. pkg_grep_summary: in order to support summaries for multi-variant packages it is strongly recommented to use 'fvalue' variable in condition instead of '$2'. Man page and README update accordingly.
52 lines
1.2 KiB
Groff
52 lines
1.2 KiB
Groff
.\" $NetBSD: pkg_grep_summary.1,v 1.3 2008/09/07 16:53:32 cheusov Exp $
|
|
.\"
|
|
.\" Copyright (c) 2008 by Aleksey Cheusov (vle@gmx.net)
|
|
.\" Absolutely no warranty.
|
|
.\"
|
|
.Dd Jan 29, 2008
|
|
.Dt PKG_GREP_SUMMARY 1
|
|
.Sh NAME
|
|
.Nm pkg_grep_summary
|
|
.Nd matching program for pkgsrc packages summary
|
|
.Sh SYNOPSIS
|
|
.Nm
|
|
.Op Ar OPTIONS
|
|
.Ar field
|
|
.Ar condition
|
|
.Sh DESCRIPTION
|
|
.Nm
|
|
outputs a summary information about packages that matches
|
|
the specified condition.
|
|
In other words, pkg_grep_summary is a search tool
|
|
somewhat similar to
|
|
grep
|
|
,
|
|
PKGSRCDIR/pkglocate
|
|
,
|
|
pkg_find
|
|
etc. but it is multifield
|
|
searcher and is fast because it uses summaries instead
|
|
of pkgsrc packages source tree.
|
|
.Pp
|
|
The options are as follows:
|
|
.Bl -tag -width indent
|
|
.It Fl h
|
|
display help message
|
|
.El
|
|
.Sh EXAMPLES
|
|
.Bd -literal
|
|
pkg_grep_summary 'PKGNAME' 'fvalue ~ /judy/' \\
|
|
< /usr/pkgsrc/packages/pkg_summary.txt
|
|
pkg_grep_summary 'PKGPATH' 'fvalue ~ /^lang\\//' \\
|
|
< /usr/pkgsrc/packages/pkg_summary.txt
|
|
pkg_grep_summary 'DEPENDS' 'fvalue ~ /libX/' \\
|
|
< /usr/pkgsrc/pkg_src_summary.txt
|
|
pkg_grep_summary 'COMMENT' 'toupper(fvalue) ~ /DNS/' \\
|
|
< /usr/pkgsrc/pkg_src_summary.txt
|
|
.Ed
|
|
.Sh SEE ALSO
|
|
.Xr pkg_summary-utils 7
|
|
.Xr pkg_summary 5
|
|
.Sh AUTHOR
|
|
.An Aleksey Cheusov
|
|
.Aq vle@gmx.net
|