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 <l...@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 $