From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751443AbdHFBqa (ORCPT ); Sat, 5 Aug 2017 21:46:30 -0400 Received: from smtprelay0068.hostedemail.com ([216.40.44.68]:45517 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751333AbdHFBqD (ORCPT ); Sat, 5 Aug 2017 21:46:03 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 64,4,0,,d41d8cd98f00b204,joe@perches.com,:::::,RULES_HIT:41:355:379:541:800:960:973:982:988:989:1260:1345:1359:1437:1534:1541:1711:1730:1747:1777:1792:2332:2393:2559:2562:3138:3139:3140:3141:3142:3352:3653:3865:3866:3867:3868:5007:6261:7903:10004:10848:11658:11914:12043:12296:12555:12895:13069:13311:13357:14181:14384:14394:14721:21080:21212:21627:30034:30054,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: wool74_8bf96e4ec1241 X-Filterd-Recvd-Size: 1752 From: Joe Perches To: Linus Torvalds , linux-kernel@vger.kernel.org Cc: Andrew Morton Subject: [PATCH 3/4] parse-maintainers: Move matching sections from MAINTAINERS Date: Sat, 5 Aug 2017 18:45:49 -0700 Message-Id: <10dcdbe0db554126bc2192c2a9640a6e9fbf9799.1501983685.git.joe@perches.com> X-Mailer: git-send-email 2.10.0.rc2.1.g053435c In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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