On Mon, 24 May 2021 18:18:44 +0300, Vadim Zhukov <persg...@gmail.com> wrote:
> > Anyway, here's the new version of the diff: > > > > diff efc26b0628a018a694a05768ccbc773a0ed2e5ad /usr/ports > > blob - bb8568b21b82fed260785c869a3cecfc4d4816cb > > file + infrastructure/bin/portcheck > > --- infrastructure/bin/portcheck > > +++ infrastructure/bin/portcheck > > @@ -612,6 +612,13 @@ check_port_dir() { > > portmk_exists=true > > ;; > > > > + modules.inc) > > + test -f "$F" || err "$F is not a file" > > + egrep -q '\.include "\./modules\.inc"' > > "$dir"/Makefile || > > + err "$F not included in Makefile" > > I'd recommend the following line instead: > > fgrep -qx '.include "./modules.inc"' > > This will catch more cases, including commented out lines, and reads > easier, IMO. :-) With it, fine by me. I initially didn't read the emails and just blindly tried Paco's diff and indeed it didn't catch the commented-out-to-test line. I agree the fgrep is easier to read (and it does catch the commented out line), ok danj@ with it. Cheers, Daniel