[pacman-dev] [PATCH] makepkg: list files containing $srcdir (FS#31558)

Allan McRae allan at archlinux.org
Mon May 20 19:21:18 EDT 2013


On 21/05/13 09:09, Phillip Smith wrote:
> On 20 May 2013 20:58, Dave Reisner <d at falconindy.com> wrote:
>> Not what I had in mind (or gave you). This will "work", but the process
>> substitution is preferable over the here string.
> 
> Sorry; what I saw in yours was '<<' which obviously didn't work so I
> assumed you meant '<<<'
> 
> On 20 May 2013 21:07, Allan McRae <allan at archlinux.org> wrote:
>> Also not you do not need the whole for loop here.  Just
>>
>>  printf "  %s\n" "${srcdir_refs[@]}"
> 
> That did not work in my testing; line breaks were not preserved.
> 


allan at arya ~
> mapfile -t srcdir_refs < <(cd "tmp" && find -type f -exec grep -Il
"10" {} +)

allan at arya ~
> echo ${srcdir_refs[@]}
./out/out-7.txt ./out/out-3.txt ./out/out-2.txt ./out/out-9.txt
./out/out-8.txt ./out/out-5.txt ./out/out-4.txt ./out/out-1.txt
./out/out-6.txt

allan at arya ~
> printf "  %s\n" ${srcdir_refs[@]}
  ./out/out-7.txt
  ./out/out-3.txt
  ./out/out-2.txt
  ./out/out-9.txt
  ./out/out-8.txt
  ./out/out-5.txt
  ./out/out-4.txt
  ./out/out-1.txt
  ./out/out-6.txt





More information about the pacman-dev mailing list