aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2017-08-05 21:45:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-08-08 14:16:14 -0400
commitb95c29a20f070babfea92ab8f741ec94695617d3 (patch)
treecb469e1612ee52dd744d2be7e2ef4c33e596eb4b /scripts
parentfe9090301fed202a80a6113534efaa0d9184543b (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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/parse-maintainers.pl12
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 {
109} 109}
110 110
111my %hash; 111my %hash;
112my %new_hash;
112 113
113file_input(\%hash, "MAINTAINERS"); 114file_input(\%hash, "MAINTAINERS");
115
116foreach my $type (@ARGV) {
117 foreach my $key (keys %hash) {
118 if ($key =~ /$type/ || $hash{$key} =~ /$type/) {
119 $new_hash{$key} = $hash{$key};
120 delete $hash{$key};
121 }
122 }
123}
124
114alpha_output(\%hash, "MAINTAINERS.new"); 125alpha_output(\%hash, "MAINTAINERS.new");
126alpha_output(\%new_hash, "SECTION.new");
115 127
116exit(0); 128exit(0);