Writing spec files: reusable code...

Panu Matilainen pmatilai at laiskiainen.org
Tue May 14 09:58:02 UTC 2013


On 05/14/2013 12:31 PM, Alice Wonder wrote:
> On Tue, 2013-05-14 at 10:59 +0200, Thomas Lehmann wrote:
>> Hi,
>>
>> thinking of some shell scripting being reusable...
>> Is it somehow possible to write some shell scripting
>> code once and to reuse it in different scriptlet sections?
>
> Yes, define it as a macro.

...or use %include, or if you want to reuse the entire script for 
different sections you can do eg

%pre -f <script file>

%post -f <script file>

	- Panu -



More information about the Rpm-list mailing list