Message ID | CAMfHzOtQ17ETU5HOChjPwfaPYbE1yPw2ADnEBS61WxbXPpTjVg@mail.gmail.com |
---|---|
State | New |
Headers | show |
Eric Gallager <egall@gwmail.gwu.edu> writes: > I've attached trivial, 1-line patch to fixincludes_check.tpl; it > allows 'make check' to succeed on OS X, by ignoring the files that > Finder creates to keep track of the status of directories. > > -Eric Gallager > fixincludes/check.tpl | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fixincludes/check.tpl b/fixincludes/check.tpl > index 0d1f444..300aeac 100644 > --- a/fixincludes/check.tpl > +++ b/fixincludes/check.tpl > @@ -143,6 +143,7 @@ cd $TESTBASE > > find * -type f -print | \ > fgrep -v 'CVS/' | \ > +fgrep -v '.DS_Store' | \ > fgrep -v '.svn/' > ${TESTDIR}/LIST > > exitok=` find ... ! -name .DS_Store ... Andreas.
I was just matching the code that was already used there... should the lines to ignore the CVS and .svn folders be re-written into the style you propose, too? On 7/5/15, Andreas Schwab <schwab@linux-m68k.org> wrote: > Eric Gallager <egall@gwmail.gwu.edu> writes: > >> I've attached trivial, 1-line patch to fixincludes_check.tpl; it >> allows 'make check' to succeed on OS X, by ignoring the files that >> Finder creates to keep track of the status of directories. >> >> -Eric Gallager >> fixincludes/check.tpl | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/fixincludes/check.tpl b/fixincludes/check.tpl >> index 0d1f444..300aeac 100644 >> --- a/fixincludes/check.tpl >> +++ b/fixincludes/check.tpl >> @@ -143,6 +143,7 @@ cd $TESTBASE >> >> find * -type f -print | \ >> fgrep -v 'CVS/' | \ >> +fgrep -v '.DS_Store' | \ >> fgrep -v '.svn/' > ${TESTDIR}/LIST >> >> exitok=` > > find ... ! -name .DS_Store ... > > Andreas. > > -- > Andreas Schwab, schwab@linux-m68k.org > GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 > "And now for something completely different." >
Eric Gallager <egall@gwmail.gwu.edu> writes: > I was just matching the code that was already used there... should the > lines to ignore the CVS and .svn folders be re-written into the style > you propose, too? Yes, that would be an improvement. Andreas.
On 07/05/2015 04:58 PM, Eric Gallager wrote: > I was just matching the code that was already used there... should the > lines to ignore the CVS and .svn folders be re-written into the style > you propose, too? Might as well have a consistent style. Embedding them into the "find" ought to be marginally faster than a pipeline of fgrep processes. jeff
On 7/6/15, Jeff Law <law@redhat.com> wrote: > On 07/05/2015 04:58 PM, Eric Gallager wrote: >> I was just matching the code that was already used there... should the >> lines to ignore the CVS and .svn folders be re-written into the style >> you propose, too? > Might as well have a consistent style. Embedding them into the "find" > ought to be marginally faster than a pipeline of fgrep processes. > > jeff > Okay, I tried embedding "! -name CVS/ ! -name .svn/" into the find command, too, but that just led to warnings such as: find: warning: Unix filenames usually don't contain slashes (though pathnames do). That means that '-name `CVS/'' will probably evaluate to false all the time on this system. You might find the '-wholename' test more useful, or perhaps '-samefile'. Alternatively, if you are using GNU grep, you could use 'find ... -print0 | grep -FzZ `CVS/''. find: warning: Unix filenames usually don't contain slashes (though pathnames do). That means that '-name `.svn/'' will probably evaluate to false all the time on this system. You might find the '-wholename' test more useful, or perhaps '-samefile'. Alternatively, if you are using GNU grep, you could use 'find ... -print0 | grep -FzZ `.svn/''. I'm not really sure which of these alternatives to go with... cc-ing the fixincludes maintainer to see which he wants to go with...
Eric Gallager <egall@gwmail.gwu.edu> writes:
> Okay, I tried embedding "! -name CVS/ ! -name .svn/" into the find
-name does an exact match, so you don't need the slash.
Andreas.
diff --git a/fixincludes/check.tpl b/fixincludes/check.tpl index 0d1f444..300aeac 100644 --- a/fixincludes/check.tpl +++ b/fixincludes/check.tpl @@ -143,6 +143,7 @@ cd $TESTBASE find * -type f -print | \ fgrep -v 'CVS/' | \ +fgrep -v '.DS_Store' | \ fgrep -v '.svn/' > ${TESTDIR}/LIST exitok=`