On Tue, Dec 29, 2009 at 08:16:37AM +0100, David Kastrup wrote:
> > -   find $(outdir)/offline-root -type l -delete
> > +   find $(outdir)/offline-root -type l | xargs rm -f
> >  endif # ifeq ($(out),www)
> 
> What's the rationale? 

The `-delete' primary isn't very portable, it's a GNU extension.

> The latter form is less efficient

I doubt it's measurable. Using find ... -exec ... {} ... ; would
be inefficient, but using find and xargs should be fast.

> and less secure
> (if somebody places files with spaces or newlines into the latter
> directory, things may get ugly).

Then change it to something like this:

        find $(outdir)/offline-root -type l -print0 | xargs -0 rm -f --

Or even this (completely POSIX compliant):

        find $(outdir)/offline-root -type -l -exec rm -f -- '{}' +

(but then I've to patch it again, since find(1) on OpenBSD doesn't yet
support the `-exec command {} +' primary).

Ciao,
        Kili


_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to