lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Use find ... | xargs rm -f instead of find ... -delete


From: David Kastrup
Subject: Re: [PATCH] Use find ... | xargs rm -f instead of find ... -delete
Date: Tue, 29 Dec 2009 08:16:37 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux)

Matthias Kilian <address@hidden> writes:

> ---
>  GNUmakefile.in |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/GNUmakefile.in b/GNUmakefile.in
> index 6574e65..6c2c54f 100644
> --- a/GNUmakefile.in
> +++ b/GNUmakefile.in
> @@ -123,7 +123,7 @@ WWW-post:
>       $(buildscript-dir)/mutopia-index -o $(outdir)/examples.html input/
>       find $(outdir) -name '*-root' | xargs rm -rf
>       $(buildscript-dir)/www_post $(PACKAGE_NAME) $(TOPLEVEL_VERSION) 
> $(outdir) "$(WEB_TARGETS)"
> -     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 latter form is less efficient and less secure
(if somebody places files with spaces or newlines into the latter
directory, things may get ugly).

For example, one test for sysadmins' carefulness is something like

mkdir -p '/tmp/this
/etc/passwd
/tmp/could happen'

Of course, if offline-root is guaranteed to be under complete control of
the person doing the compilation, this is less of an issue.

-- 
David Kastrup





reply via email to

[Prev in Thread] Current Thread [Next in Thread]