This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
Re: PATCH: generic-build-script: Make output of depend functionunique
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: cygwin-apps at cygwin dot com
- Date: Mon, 11 Oct 2004 11:17:30 -0400 (EDT)
- Subject: Re: PATCH: generic-build-script: Make output of depend functionunique
- References: <87d603sjd6.fsf@vzell-de.de.oracle.com> <415C8692.6020303@lapo.it><Pine.GSO.4.61.0409302151340.21480@slinky.cs.nyu.edu>
- Reply-to: cygwin-apps at cygwin dot com
On Thu, 30 Sep 2004, Igor Pechtchanski wrote:
> On Fri, 1 Oct 2004, Lapo Luchini wrote:
>
> > Dr. Volker Zell wrote:
> > > (cd ${instdir} && \
> > > find ${instdir} -name "*.exe" -o -name "*.dll" | xargs cygcheck | \
> > > sed -e '/\.exe/d' -e 's,\\,/,g' | sort -bu | xargs -n1 cygpath -u \
> > > - | xargs cygcheck -f | sed 's%^% %' ; \
> > > + | xargs cygcheck -f | sed 's%^% %' | uniq ; \
> > > true )
> > > }
> >
> > Wouldn't the last "uniq" better be a "sort -u" instead?
> > Files are sorted after the first "sed", that's true: but they get sorted
> > by file name, while in the following passage we extract package name
> > which contains those files: who assures us that the package list is
> > already sorted?
> > I guess this is true in "most of the cases" (where the package name is
> > the same as the file name), or is there an "implied" sort that I didn't
> > catch?
> >
> > Lapo
>
> Yeah, I was thinking the same thing. Technically, "cygcheck -f" *will*
> sort the packages for all files specified on the command line, but just in
> case xargs decides to split the file list across multiple command lines, a
> "sort -u" would definitely be safer.
> Igor
Ok, I've committed this with a "sort -u" instead of "uniq". Thanks,
Volker.
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing." -- Dr. Jubal Harshaw