diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/get_maintainer.pl | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index f46576949ccb..e5a400c53bf0 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl | |||
| @@ -110,10 +110,12 @@ my %VCS_cmds_hg = ( | |||
| 110 | "blame_commit_pattern" => "^([0-9a-f]+):" | 110 | "blame_commit_pattern" => "^([0-9a-f]+):" |
| 111 | ); | 111 | ); |
| 112 | 112 | ||
| 113 | if (-f "${lk_path}.get_maintainer.conf") { | 113 | my $conf = which_conf(".get_maintainer.conf"); |
| 114 | if (-f $conf) { | ||
| 114 | my @conf_args; | 115 | my @conf_args; |
| 115 | open(my $conffile, '<', "${lk_path}.get_maintainer.conf") | 116 | open(my $conffile, '<', "$conf") |
| 116 | or warn "$P: Can't open .get_maintainer.conf: $!\n"; | 117 | or warn "$P: Can't find a readable .get_maintainer.conf file $!\n"; |
| 118 | |||
| 117 | while (<$conffile>) { | 119 | while (<$conffile>) { |
| 118 | my $line = $_; | 120 | my $line = $_; |
| 119 | 121 | ||
| @@ -961,6 +963,18 @@ sub which { | |||
| 961 | return ""; | 963 | return ""; |
| 962 | } | 964 | } |
| 963 | 965 | ||
| 966 | sub which_conf { | ||
| 967 | my ($conf) = @_; | ||
| 968 | |||
| 969 | foreach my $path (split(/:/, ".:$ENV{HOME}:.scripts")) { | ||
| 970 | if (-e "$path/$conf") { | ||
| 971 | return "$path/$conf"; | ||
| 972 | } | ||
| 973 | } | ||
| 974 | |||
| 975 | return ""; | ||
| 976 | } | ||
| 977 | |||
| 964 | sub mailmap { | 978 | sub mailmap { |
| 965 | my (@lines) = @_; | 979 | my (@lines) = @_; |
| 966 | my %hash; | 980 | my %hash; |
