[pacman-dev] [PATCH v2] makepkg: print filenames and line numbers of references to $srcdir & $pkgdir in built package

Allan McRae allan at archlinux.org
Sat Oct 15 08:52:21 UTC 2016

On 15/10/16 12:27, Ivy Foster wrote:
> On 14 Oct 2016, at 10:07 pm -0400, Andrew Gregory wrote:
>> We're not very strict about this, but please try to keep the first
>> line of the commit message fairly short, ideally around 50 characters.
> Noted, thanks.
>> On 10/14/16 at 08:21pm, ivy.foster at gmail.com wrote:
>>> From: Ivy Foster <ivy.foster at gmail.com>
>  > +		mapfile -t refs < <(find "$pkgdir" -type f -exec grep -n "${!var}" {} +)
>> For packages with just a single file this won't print the name of the
>> matching file.  GNU grep has -H for this, but it's not POSIX.  What
>> about including /dev/null as an argument to grep so that it always has
>> more than one file?
> Ah, you're quite right. I'll fiddle with that and resubmit tomorrow, then.

Why no use -l?

-l, --files-with-matches  print only names of FILEs containing matches


More information about the pacman-dev mailing list