mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-01 18:25:59 +00:00
29 lines
763 B
Perl
Executable File
29 lines
763 B
Perl
Executable File
#!/usr/bin/env perl
|
|
|
|
use strict;
|
|
use warnings FATAL => 'all';
|
|
use English qw(-no_match_vars);
|
|
|
|
eval {
|
|
my ($year, $copyright) = @ARGV;
|
|
my ($years) = $copyright =~ m/(\S+) Percona LLC and\/or its affiliates/;
|
|
my ($first_year, $last_year) = split /-/, $years;
|
|
|
|
my $new_copyright;
|
|
if ( $first_year && $last_year ) {
|
|
$new_copyright = "$first_year-$year Percona LLC and/or its affiliates"
|
|
}
|
|
elsif ( $first_year < $year ) {
|
|
$new_copyright = "$first_year-$year Percona LLC and/or its affiliates"
|
|
}
|
|
else {
|
|
$new_copyright = "$first_year Percona LLC and/or its affiliates"
|
|
}
|
|
|
|
$copyright =~ s/\S+ Percona LLC and\/or its affiliates/$new_copyright/;
|
|
print $copyright;
|
|
};
|
|
die $EVAL_ERROR if $EVAL_ERROR;
|
|
|
|
exit 0;
|