public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Randy Dunlap <rdunlap@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RESEND v4] MAINTAINERS: fix lots of alphabetic ordering
Date: Wed, 19 Jul 2017 20:12:58 -0700	[thread overview]
Message-ID: <1500520378.25934.49.camel@perches.com> (raw)
In-Reply-To: <1500512701.25934.47.camel@perches.com>

On Wed, 2017-07-19 at 18:05 -0700, Joe Perches wrote:
> On Wed, 2017-07-19 at 17:08 -0700, Linus Torvalds wrote:
> >  (b) we could split this thing up some sane way.
> > 
> > Anybody got any ideas?
[]
> Just for ease of manipulation and not breaking the script much,
> I'd suggest just having a MAINTAINERS directory and stuffing
> each of the sections into separate files.
> 
> The script would only need to add $ cat MAINTAINERS/* as input.

Maybe something like the script below to break up the MAINTAINERS file
into separate files.  It also uses underscores for spaces in the
section header -> filename translation.

This seems to work OK except for this single section which doesn't
follow the normal single line section header style.

EDAC-XGENE
APPLIED MICRO (APM) X-GENE SOC EDAC
M:     Loc Ho <lho@apm.com>
S:     Supported
F:     drivers/edac/xgene_edac.c
F:     Documentation/devicetree/bindings/edac/apm-xgene-edac.txt

That one would need manual fixup.

---
$ cat separate_MAINTAINERS.bash
mkdir MAINTAINERS.tmp

sed -n '3,122p' MAINTAINERS > MAINTAINERS.tmp/00-README

sed -n '131,500000p' MAINTAINERS | while read line; do
    if [[ ! "$line" =~ ^[A-Z0-9a-z][A-Z0-9a-z\.\-] ]]; then
	echo "bad line: $line"
	continue
    fi
    file=MAINTAINERS.tmp/$(echo -n $line |
			       sed -r -e 's/\s+/_/g' -e 's@/@-@g' -e 's/_-_/-/' -e 's/:*$//')
    echo "$line" > $file
    while read line; do
	if [[ ! $line =~ ^[A-Z]: ]]; then
	    break
	fi
	echo "$line" >> $file
    done
done
$

  reply	other threads:[~2017-07-20  3:13 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-19 21:40 [PATCH RESEND v4] MAINTAINERS: fix lots of alphabetic ordering Randy Dunlap
2017-07-19 21:44 ` Andrew Morton
2017-07-20  0:08   ` Linus Torvalds
2017-07-20  0:18     ` Randy Dunlap
2017-07-20  0:18     ` Linus Torvalds
2017-07-20  0:19     ` Randy Dunlap
2017-07-20  0:26       ` Linus Torvalds
2017-07-20  0:35         ` Linus Torvalds
2017-07-20  0:53           ` Linus Torvalds
2017-07-20  1:04             ` Randy Dunlap
2017-07-20  1:05     ` Joe Perches
2017-07-20  3:12       ` Joe Perches [this message]
2017-07-20  4:24       ` Linus Torvalds
2017-07-20  4:36         ` Theodore Ts'o
2017-07-20  4:53           ` Linus Torvalds
2017-07-20  4:43         ` Joe Perches
2017-07-20  4:57           ` Linus Torvalds
2017-07-20 10:54           ` Michael Ellerman
2017-07-20 16:48             ` Joe Perches
2017-07-20 18:03               ` Linus Torvalds
2017-07-20 22:50                 ` Joe Perches
2017-07-19 21:49 ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1500520378.25934.49.camel@perches.com \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox