Piping find output to an rpm macro
nicolas.mailhot at laposte.net
nicolas.mailhot at laposte.net
Wed Sep 20 14:28:09 UTC 2017
Hi,
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
Regards,
--
Nicolas Mailhot
More information about the Rpm-list
mailing list