diff options
author | Joe Perches | 2017-08-05 18:45:49 -0700 |
---|---|---|
committer | Linus Torvalds | 2017-08-08 11:16:14 -0700 |
commit | b95c29a20f070babfea92ab8f741ec94695617d3 (patch) | |
tree | cb469e1612ee52dd744d2be7e2ef4c33e596eb4b | |
parent | fe9090301fed202a80a6113534efaa0d9184543b (diff) |
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: Joe Perches <joe@perches.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | scripts/parse-maintainers.pl | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/parse-maintainers.pl b/scripts/parse-maintainers.pl index c286154a2b68..e40b53db7f9f 100644 --- a/scripts/parse-maintainers.pl +++ b/scripts/parse-maintainers.pl @@ -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); |