|
| 1 | +#!/usr/bin/perl |
| 2 | +=pod |
| 3 | +
|
| 4 | + update-authors.pl is part of Eye of MATE. |
| 5 | +
|
| 6 | + Eye of MATE is free software: you can redistribute it and/or modify |
| 7 | + it under the terms of the GNU General Public License as published by |
| 8 | + the Free Software Foundation, either version 2 of the License, or |
| 9 | + (at your option) any later version. |
| 10 | +
|
| 11 | + Eye of MATE is distributed in the hope that it will be useful, |
| 12 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | + GNU General Public License for more details. |
| 15 | +
|
| 16 | + You should have received a copy of the GNU General Public License |
| 17 | + along with Eye of MATE. If not, see <http://www.gnu.org/licenses/>. |
| 18 | +
|
| 19 | +=cut |
| 20 | +use strict; |
| 21 | +use warnings; |
| 22 | + |
| 23 | +sub ReplaceAuthors { |
| 24 | + my @authors = @_; |
| 25 | + $_ eq 'bl0ckeduser <bl0ckedusersoft%gmail.com>' and $_ = 'Gabriel Cormier-Affleck <bl0ckedusersoft%gmail.com>' for @authors; |
| 26 | + $_ eq 'hekel <hekel%archlinux.info>' and $_ = 'Adam Erdman <hekel%archlinux.info>' for @authors; |
| 27 | + $_ eq 'infirit <infirit%gmail.com>' and $_ = 'Sander Sweers <infirit%gmail.com>' for @authors; |
| 28 | + $_ eq 'leigh123linux <leigh123linux%googlemail.com>' and $_ = 'Leigh Scott <leigh123linux%googlemail.com>' for @authors; |
| 29 | + $_ eq 'lyokha <alexey.radkov%gmail.com>' and $_ = 'Alexey Radkov <alexey.radkov%gmail.com>' for @authors; |
| 30 | + $_ eq 'Martin Wimpress <code%flexion.org>' and $_ = 'Martin Wimpress <martin%mate-desktop.org>' for @authors; |
| 31 | + $_ eq 'monsta <monsta%inbox.ru>' and $_ = 'Vlad Orlov <monsta%inbox.ru>' for @authors; |
| 32 | + $_ eq 'Monsta <monsta%inbox.ru>' and $_ = 'Vlad Orlov <monsta%inbox.ru>' for @authors; |
| 33 | + $_ eq 'raveit65 <chat-to-me%raveit.de>' and $_ = 'Wolfgang Ulbrich <mate%raveit.de>' for @authors; |
| 34 | + $_ eq 'raveit65 <mate%raveit.de>' and $_ = 'Wolfgang Ulbrich <mate%raveit.de>' for @authors; |
| 35 | + $_ eq 'rbuj <robert.buj%gmail.com>' and $_ = 'Robert Buj <robert.buj%gmail.com>' for @authors; |
| 36 | + $_ eq 'Scott Balneaves <sbalneav%ltsp.org>' and $_ = 'Scott Balneaves <sbalneav%mate-desktop.org>' for @authors; |
| 37 | + $_ eq 'Wolfgang Ulbrich <chat-to-me%raveit.de>' and $_ = 'Wolfgang Ulbrich <mate%raveit.de>' for @authors; |
| 38 | + return @authors; |
| 39 | +} |
| 40 | + |
| 41 | +sub GetCurrentAuthors { |
| 42 | + my @authors; |
| 43 | + open(FILE,"data/eom.about") or die "Can't open data/eom.about"; |
| 44 | + while (<FILE>) { |
| 45 | + if (/^Authors=*(.+)$/) { |
| 46 | + @authors=split(";",$1); |
| 47 | + } |
| 48 | + } |
| 49 | + close FILE; |
| 50 | + return ReplaceAuthors(@authors); |
| 51 | +} |
| 52 | + |
| 53 | +sub GetNewAuthors { |
| 54 | + my @authors = `git log --pretty="%an <%ae>" --since "2012-01-01" -- . "_.h" "_.c" | sort | uniq | sed 's/@/%/g' | sed '/^mate-i18n.*/d'`; |
| 55 | + chomp @authors; |
| 56 | + return ReplaceAuthors(@authors); |
| 57 | +} |
| 58 | + |
| 59 | +my @A = GetCurrentAuthors; |
| 60 | +my @B = GetNewAuthors; |
| 61 | +my @merged = sort { $a cmp $b } keys %{{map {($_ => 1)} (@A, @B)}}; |
| 62 | +print join(';',@merged) . ';'; |
0 commit comments