[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 6/6] firmware/shim: fix build process to use POSIX find options
On Wed, Jan 17, 2018 at 05:58:43PM +0000, Andrew Cooper wrote: > On 17/01/18 17:32, Roger Pau Monné wrote: > > On Wed, Jan 17, 2018 at 04:24:27PM +0000, Ian Jackson wrote: > >> Roger Pau Monne writes ("[PATCH 6/6] firmware/shim: fix build process to > >> use POSIX find options"): > >>> The -printf find option is not POSIX compatible, so replace it with > >>> another rune. > >> ... > >>> cd $(D)/$(d); \ > >>> - find $(XEN_ROOT)/$(d)/ -type d -printf "./%P\n" | xargs > >>> mkdir -p);) > >>> + find $(XEN_ROOT)/$(d)/ -type d -exec sh -c \ > >>> + "echo {} | sed 's,^$(XEN_ROOT)/$(d)/,,g' | xargs mkdir > >>> -p" \;);) > >> This is now a pretty nasty shell construct. > >> > >> If you're going to use sed, you could just > >> find ... -print | sed ... | xargs mkdir -p > > I think I will go with this one... What about using: find $(XEN_ROOT)/$(d)/ -type d | sed 's,^$(XEN_ROOT)/$(d)/,,g' | xargs mkdir -p This AFAICT works fine, and should be the one involving less forks since the whole output is processed at once. Thanks, Roger. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |