Skip to content

Commit

Permalink
parse-maintainers: Move matching sections from MAINTAINERS
Browse files Browse the repository at this point in the history
Allow any number of command line arguments to match either the
section header or the section contents and create new files.

Create MAINTAINERS.new and SECTION.new.

This allows scripting of the movement of various sections from
MAINTAINERS.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
JoePerches authored and torvalds committed Aug 8, 2017
1 parent fe90903 commit b95c29a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scripts/parse-maintainers.pl
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,20 @@ sub file_input {
}

my %hash;
my %new_hash;

file_input(\%hash, "MAINTAINERS");

foreach my $type (@ARGV) {
foreach my $key (keys %hash) {
if ($key =~ /$type/ || $hash{$key} =~ /$type/) {
$new_hash{$key} = $hash{$key};
delete $hash{$key};
}
}
}

alpha_output(\%hash, "MAINTAINERS.new");
alpha_output(\%new_hash, "SECTION.new");

exit(0);

0 comments on commit b95c29a

Please sign in to comment.