Skip to content
Snippets Groups Projects
Commit b95c29a2 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

parse-maintainers: Move matching sections from MAINTAINERS


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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent fe909030
No related branches found
No related tags found
No related merge requests found
...@@ -109,8 +109,20 @@ sub file_input { ...@@ -109,8 +109,20 @@ sub file_input {
} }
my %hash; my %hash;
my %new_hash;
file_input(\%hash, "MAINTAINERS"); 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(\%hash, "MAINTAINERS.new");
alpha_output(\%new_hash, "SECTION.new");
exit(0); exit(0);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment