A new and better way to do "make readmes"?
Conrad J. Sabatier
conrads at cox.net
Thu Feb 2 21:44:25 UTC 2012
On Thu, 2 Feb 2012 13:25:14 -0800
Jason Helfman <jhelfman at e-e.com> wrote:
> On Thu, Feb 02, 2012 at 03:21:37PM -0600, Conrad J. Sabatier thus
> spake:
[snip]
> >The workaround method I've been running out of cron for the last
> >month or so is:
> >
> >1) Create a "sentinel" file under /tmp to use as a timestamp, just
> >before running "cvs update" on ports (I update my ports tree from a
> >local copy of the CVS repo maintained via csup)
> >
> >2) After cvs completes, look for any port directories containing
> >updates (check timestamps against the sentinel file) and do a "make
> >readme" for each one:
> >
> >find $PORTSDIR -type f ! -path "*/CVS/*" -newercm $SENTINEL -depth 3
> >|
> > xargs dirname |
> > sort -u | xargs -I@ /bin/sh -c "cd @ && make readme"
> >
> >3) Last, but not least, build the category README.html for any
> >categories with ports containing newly updated README.html files.
> >
> >I have noticed while doing this that, as you mentioned, the category
> >READMEs take considerably longer than the individual ports'.
> >
> >I don't even bother to rebuild the top-level file, since it's
> >basically unchanging anyway.
[snip]
> Not to fancy, but I used this when I was updating the readmes to not
> break.
>
> #!/bin/sh
> cd /usr/ports
> for i in `make -V SUBDIR |sed s/local//g`; do for p in `make -C $i -V
> SUBDIR`; do echo $i/$p && sudo make -C "$i/$p" readme ; done; done
> >> ~/readmes.log
>
> -jgh
Interesting. I'll take a look at using that. Thanks!
--
Conrad J. Sabatier
conrads at cox.net
More information about the freebsd-ports
mailing list