You are not logged in.
I have a script for a hook that rebuilds kernels, but avoids doing that when that kernel was also updated that upgrade. The only problem is mkinitcpio needs multiple -p flags to build multiple presets at once, but not all. Requiring multiple -p flags just makes the logic for my script more complicated. Currently, how my script is written mkinitcpio only accepts the first item of a list of arguments passed to -p for building. Are there any switches for mkinitcpio that can take multiple kernel preset arguments at once?
Last edited by zerophase (2019-02-23 19:40:12)
Offline
according to 'man mkinitcpio' you can use -P or -p or -p multiple times.
i don't see a problem there.
are you asking if mkinitcpio can accomodate your script, instead of the other way around?
...
i guess we should rather try to change your script, no?
Offline
man mkinitcpioMoving to NC...
Offline
This is not very clear. Do you mean you have a list of presets that need to be built but you haven't found a way to construct the proper mkinitcpio line?
presets="first second third"
mkinitcpio $(printf '-p %s ' $presets)"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
This is not very clear. Do you mean you have a list of presets that need to be built but you haven't found a way to construct the proper mkinitcpio line?
presets="first second third" mkinitcpio $(printf '-p %s ' $presets)
Thanks. Yeah, printf would work for adding the -p. I was just hoping there might have been an undocumented feature allowing for multiple presets, without multiple -p flags.
Offline