Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1704725
| From | Joe Perches <joe@perches.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3/4] parse-maintainers: Move matching sections from MAINTAINERS |
| Date | 2017-08-06 03:50 +0200 |
| Message-ID | <ubiRA-4c2-11@gated-at.bofh.it> (permalink) |
| References | <ubiRz-4c2-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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>
---
scripts/parse-maintainers.pl | 12 ++++++++++++
1 file changed, 12 insertions(+)
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);
--
2.10.0.rc2.1.g053435c
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/4] Scripted update of the MAINTAINERS files Joe Perches <joe@perches.com> - 2017-08-06 03:50 +0200
[PATCH 4/4] scripts/move_maintainer_sections.bash Joe Perches <joe@perches.com> - 2017-08-06 03:50 +0200
Re: [PATCH 4/4] scripts/move_maintainer_sections.bash Joe Perches <joe@perches.com> - 2017-08-07 19:10 +0200
Re: [PATCH 4/4] scripts/move_maintainer_sections.bash Linus Torvalds <torvalds@linux-foundation.org> - 2017-08-08 20:40 +0200
Re: [PATCH 4/4] scripts/move_maintainer_sections.bash Joe Perches <joe@perches.com> - 2017-08-09 02:40 +0200
[PATCH 2/4] parse-maintainers: Use perl hash references and specific filenames Joe Perches <joe@perches.com> - 2017-08-06 03:50 +0200
[PATCH 3/4] parse-maintainers: Move matching sections from MAINTAINERS Joe Perches <joe@perches.com> - 2017-08-06 03:50 +0200
csiph-web