> Date: Fri, 05 Feb 2016 17:47:27 +0000
> From: [email protected] (akhiezer)
> To: BLFS Development List <[email protected]>
> Subject: Re: [blfs-dev] Minor correction to curl install
>
> > To: BLFS Development List <[email protected]>
> > From: Tim Tassonis <[email protected]>
> > Date: Fri, 5 Feb 2016 17:48:14 +0100
> > Subject: [blfs-dev] Minor correction to curl install
> >
> > Hi all
> >
> > I just install curl from blfs and would suggest a minor correction to
> > the install section:
> >
> > find docs \( -name Makefile\* \
> > -o -name \*.1 \
> > -o -name \*.3 \) \
> > -exec rm {} \; &&
>
>
> (Also, '[-depth] ... -delete' instead of the '-exec rm {} \;' ? The
> latter isn't wrong; just a little unnecessary to call-out via '-exec' .)
>
The '-exec rm {} \;' will return false on dirs (& spew out
errors/warnings) - tho' not cause find() to return non-zero.
Normally that'd be tightened-up (proactively, defensively) a bit.
According to blfs svn for curl (
http://www.linuxfromscratch.org/blfs/view/svn/basicnet/curl.html ),
the intent of the find-rmv is to remove files.
So depending on whether it's just ordinary files, or just non-dirs,
then one would use '-type f' or '! -type d' after the 'docs' or at
least before the '-exec' (tho' of course some find() implems can/will
do some 'optimising'/rearranging of some parts of their cmdlines).
And for completeness, if dirs are to be included in the rmvl, then
one would normally use the '[-depth] ... -delete' construct instead
of the '-exec ...' .
akh
--
--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page