Piping find output to an rpm macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



I have a set of spec files that perfom the same operations on file lists.
They are bitrotting fast with each spec differing slightly from the other

I'd like to consolidate the operations in a common macro to have a single place to tweak/fix.

So basically I want something like

%mymacro -f outputfile $(find . -iname '*\.foo')

with mymacro defined as

%mymacro(f:) \
%define output_file_list  %{?-f*}%{!?-f*:foo.file-list} \
for file in %* ; do stuff

of course that does not work with rpm failing to parse find output as an argument list

Is there a clean way to make it work? I try very hard to forget everything about rpm macros every time I need to write one


Nicolas Mailhot
Rpm-list mailing list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux