diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2019-07-29 12:13:08 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2019-07-29 12:13:08 +0300 |
commit | 8d0e711b6a4729c9e8a039d49ef8a701652bc084 (patch) | |
tree | c0674aa3305c49cdf82435b10c08eb250ab1fafd /tpnotify | |
parent | e936b4df97a31401dec55919781235bef1f849fc (diff) | |
download | tpnotify-8d0e711b6a4729c9e8a039d49ef8a701652bc084.tar.gz tpnotify-8d0e711b6a4729c9e8a039d49ef8a701652bc084.tar.bz2 |
Cleanup the whitespace
Diffstat (limited to 'tpnotify')
-rwxr-xr-x | tpnotify | 246 |
1 files changed, 123 insertions, 123 deletions
@@ -79,7 +79,7 @@ our $archive_file; # Archive file name | |||
79 | our $topdir; # Toplevel directory from the archive | 79 | our $topdir; # Toplevel directory from the archive |
80 | our $package_name; # Package name; | 80 | our $package_name; # Package name; |
81 | our $package_tarname; # Package archive name | 81 | our $package_tarname; # Package archive name |
82 | our $package_version; # Package version number | 82 | our $package_version; # Package version number |
83 | our $package_base; # Package base name | 83 | our $package_base; # Package base name |
84 | our $release_type; # Package type (alpha or stable) | 84 | our $release_type; # Package type (alpha or stable) |
85 | 85 | ||
@@ -237,7 +237,7 @@ EOT | |||
237 | $package_tarname = $package_name; | 237 | $package_tarname = $package_name; |
238 | $package_tarname =~ s/GNU\s+//; | 238 | $package_tarname =~ s/GNU\s+//; |
239 | $package_tarname = lc $package_tarname; # FIXME: this is not always right, | 239 | $package_tarname = lc $package_tarname; # FIXME: this is not always right, |
240 | # perhaps | 240 | # perhaps |
241 | info("package $package_name, tarname $package_tarname, version $package_version") if $verbose; | 241 | info("package $package_name, tarname $package_tarname, version $package_version") if $verbose; |
242 | $package_base = "$package_tarname-$package_version"; | 242 | $package_base = "$package_tarname-$package_version"; |
243 | 243 | ||
@@ -277,7 +277,7 @@ sub po_header { | |||
277 | foreach my $s (split /\\n/, $h) { | 277 | foreach my $s (split /\\n/, $h) { |
278 | if ($s =~ /^(.+?):\s*(.*)$/) { | 278 | if ($s =~ /^(.+?):\s*(.*)$/) { |
279 | $ret{lc $1}=$2; | 279 | $ret{lc $1}=$2; |
280 | } | 280 | } |
281 | } | 281 | } |
282 | \%ret; | 282 | \%ret; |
283 | } | 283 | } |
@@ -344,17 +344,17 @@ sub read_signature { | |||
344 | # Returns the expanded text. Abends on failure. | 344 | # Returns the expanded text. Abends on failure. |
345 | sub expand_template { | 345 | sub expand_template { |
346 | my $cpt = new Safe; | 346 | my $cpt = new Safe; |
347 | 347 | ||
348 | $cpt->share(qw($sender | 348 | $cpt->share(qw($sender |
349 | $fullname | 349 | $fullname |
350 | $localdomain | 350 | $localdomain |
351 | $recipient | 351 | $recipient |
352 | $archive_file | 352 | $archive_file |
353 | $archive_url | 353 | $archive_url |
354 | $package_name | 354 | $package_name |
355 | $package_version | 355 | $package_version |
356 | $package_base | 356 | $package_base |
357 | $release_type | 357 | $release_type |
358 | $topdir | 358 | $topdir |
359 | $signature)); | 359 | $signature)); |
360 | chomp(${$cpt->varglob('signature')} = read_signature); | 360 | chomp(${$cpt->varglob('signature')} = read_signature); |
@@ -380,7 +380,7 @@ sub read_mh_path { | |||
380 | } else { | 380 | } else { |
381 | last if defined($prev) && $prev =~ /^Path:/; | 381 | last if defined($prev) && $prev =~ /^Path:/; |
382 | $prev = $_; | 382 | $prev = $_; |
383 | } | 383 | } |
384 | } | 384 | } |
385 | close $fd; | 385 | close $fd; |
386 | return $prev if $prev =~ s/^Path:\s+//; | 386 | return $prev if $prev =~ s/^Path:\s+//; |
@@ -398,7 +398,7 @@ sub notify { | |||
398 | $msg->head()->add($hdr); | 398 | $msg->head()->add($hdr); |
399 | } | 399 | } |
400 | $msg->head()->add("X-Mailer: $progname $VERSION"); | 400 | $msg->head()->add("X-Mailer: $progname $VERSION"); |
401 | 401 | ||
402 | if ($verbose) { | 402 | if ($verbose) { |
403 | info("message to send"); | 403 | info("message to send"); |
404 | $msg->print(); | 404 | $msg->print(); |
@@ -449,7 +449,7 @@ sub mail_box_manager_refile { | |||
449 | $args{type} = 'maildir'; | 449 | $args{type} = 'maildir'; |
450 | $args{folder} = $folder; | 450 | $args{folder} = $folder; |
451 | } else { | 451 | } else { |
452 | abend(EX_DATAERR, "unrecognized Fcc folder: $folder"); | 452 | abend(EX_DATAERR, "unrecognized Fcc folder: $folder"); |
453 | } | 453 | } |
454 | 454 | ||
455 | my $mgr = Mail::Box::Manager->new(); | 455 | my $mgr = Mail::Box::Manager->new(); |
@@ -501,10 +501,10 @@ sub movemail_refile { | |||
501 | my %refile_tab = ( | 501 | my %refile_tab = ( |
502 | 'movemail' => { supported => \&movemail_supported, | 502 | 'movemail' => { supported => \&movemail_supported, |
503 | refile => \&movemail_refile, | 503 | refile => \&movemail_refile, |
504 | priority => 10 }, | 504 | priority => 10 }, |
505 | 'perl' => { supported => \&mail_box_manager_supported, | 505 | 'perl' => { supported => \&mail_box_manager_supported, |
506 | refile => \&mail_box_manager_refile, | 506 | refile => \&mail_box_manager_refile, |
507 | priority => 0 } | 507 | priority => 0 } |
508 | ); | 508 | ); |
509 | 509 | ||
510 | sub refile { | 510 | sub refile { |
@@ -525,7 +525,7 @@ sub refile { | |||
525 | info("using $refile_method for refiling"); | 525 | info("using $refile_method for refiling"); |
526 | &{$refile_tab{$refile_method}{refile}}(@_); | 526 | &{$refile_tab{$refile_method}{refile}}(@_); |
527 | } | 527 | } |
528 | 528 | ||
529 | 529 | ||
530 | END { | 530 | END { |
531 | chdir("/"); | 531 | chdir("/"); |
@@ -559,9 +559,9 @@ sub set_mailer { | |||
559 | } else { | 559 | } else { |
560 | err("unknown mailer spec", prefix => $locus); | 560 | err("unknown mailer spec", prefix => $locus); |
561 | return 0; | 561 | return 0; |
562 | } | 562 | } |
563 | return 1; | 563 | return 1; |
564 | } | 564 | } |
565 | 565 | ||
566 | sub read_template_file { | 566 | sub read_template_file { |
567 | my ($file, $locus) = @_; | 567 | my ($file, $locus) = @_; |
@@ -575,7 +575,7 @@ sub read_template_file { | |||
575 | return 0; | 575 | return 0; |
576 | } | 576 | } |
577 | } | 577 | } |
578 | 578 | ||
579 | my %kw = ( | 579 | my %kw = ( |
580 | keep => \$keep, | 580 | keep => \$keep, |
581 | 'template-file' => \&read_template_file, | 581 | 'template-file' => \&read_template_file, |
@@ -618,11 +618,11 @@ sub read_config { | |||
618 | s/\s+$//; | 618 | s/\s+$//; |
619 | s/#.*//; | 619 | s/#.*//; |
620 | next if ($_ eq ""); | 620 | next if ($_ eq ""); |
621 | 621 | ||
622 | if (/^(.*?)\s*=\s*(.*)/) { | 622 | if (/^(.*?)\s*=\s*(.*)/) { |
623 | $key = $1; | 623 | $key = $1; |
624 | $val = $2; | 624 | $val = $2; |
625 | 625 | ||
626 | if ($val =~ /<<(\w+)\s*$/) { | 626 | if ($val =~ /<<(\w+)\s*$/) { |
627 | $heredoc = $1; | 627 | $heredoc = $1; |
628 | $heredoc_line = $line; | 628 | $heredoc_line = $line; |
@@ -770,39 +770,39 @@ B<tpnotify> | |||
770 | [B<-m> I<SPEC>] | 770 | [B<-m> I<SPEC>] |
771 | [B<-s> I<FILE>] | 771 | [B<-s> I<FILE>] |
772 | [B<-t> I<FILE>] | 772 | [B<-t> I<FILE>] |
773 | [B<--add=>I<HDR>:I<VAL>] | 773 | [B<--add=>I<HDR>:I<VAL>] |
774 | [B<--alpha>] | 774 | [B<--alpha>] |
775 | [B<--config=>I<FILE>] | 775 | [B<--config=>I<FILE>] |
776 | [B<--debug>] | 776 | [B<--debug>] |
777 | [B<--domain=>I<DOMAIN>] | 777 | [B<--domain=>I<DOMAIN>] |
778 | [B<--dry-run>] | 778 | [B<--dry-run>] |
779 | [B<--force>] | 779 | [B<--force>] |
780 | [B<--from=>I<EMAIL>] | 780 | [B<--from=>I<EMAIL>] |
781 | [B<--fullname=>I<NAME>] | 781 | [B<--fullname=>I<NAME>] |
782 | [B<--keep>] | 782 | [B<--keep>] |
783 | [B<--mailer=>I<SPEC>] | 783 | [B<--mailer=>I<SPEC>] |
784 | [B<--no-config>] | 784 | [B<--no-config>] |
785 | [B<--no-signature>] | 785 | [B<--no-signature>] |
786 | [B<--refile-method=>B<perl> | B<mailutils>] | 786 | [B<--refile-method=>B<perl> | B<mailutils>] |
787 | [B<--signature=>I<FILE>] | 787 | [B<--signature=>I<FILE>] |
788 | [B<--stable>] | 788 | [B<--stable>] |
789 | [B<--template=>I<FILE>] | 789 | [B<--template=>I<FILE>] |
790 | [B<--to=>I<EMAIL>] | 790 | [B<--to=>I<EMAIL>] |
791 | [B<--verbose>] | 791 | [B<--verbose>] |
792 | I<URL> | 792 | I<URL> |
793 | 793 | ||
794 | B<tpnotify> | 794 | B<tpnotify> |
795 | [B<-h>] | 795 | [B<-h>] |
796 | [B<--help>] | 796 | [B<--help>] |
797 | [B<--usage>] | 797 | [B<--usage>] |
798 | 798 | ||
799 | =head1 DESCRIPTION | 799 | =head1 DESCRIPTION |
800 | 800 | ||
801 | Notifies the coordinator of the I<Translation Project> about new | 801 | Notifies the coordinator of the I<Translation Project> about new |
802 | POT file available at I<URL>. The URL must point to a tarball of | 802 | POT file available at I<URL>. The URL must point to a tarball of |
803 | a package registered at TP (I<http://translationproject.org/domain/>). | 803 | a package registered at TP (I<http://translationproject.org/domain/>). |
804 | The tool works as follows: | 804 | The tool works as follows: |
805 | 805 | ||
806 | First of all, the indicated I<URL> is downloaded to a temporary location | 806 | First of all, the indicated I<URL> is downloaded to a temporary location |
807 | on disk. The contents of the retrieved tarball is inspected. It must | 807 | on disk. The contents of the retrieved tarball is inspected. It must |
808 | contain the file F<configure.ac> in the project toplevel directory and | 808 | contain the file F<configure.ac> in the project toplevel directory and |
@@ -829,8 +829,8 @@ to be a mailbox in traditional B<UNIX> format (relative pathnames are | |||
829 | expanded relative to the user home directory). Otherwise, it is a B<folder | 829 | expanded relative to the user home directory). Otherwise, it is a B<folder |
830 | url>: | 830 | url>: |
831 | 831 | ||
832 | =over 8 | 832 | =over 8 |
833 | 833 | ||
834 | =item B<mbox:>[B<//>]I<PATHNAME> | 834 | =item B<mbox:>[B<//>]I<PATHNAME> |
835 | 835 | ||
836 | UNIX mailbox located at I<PATHNAME> (relative or absolute). | 836 | UNIX mailbox located at I<PATHNAME> (relative or absolute). |
@@ -854,12 +854,12 @@ which uses GNU mailutils. By default, B<tpnotify> attempts to use B<perl>, | |||
854 | and falls back to B<mailutils> if that's not possible. If the latter is not | 854 | and falls back to B<mailutils> if that's not possible. If the latter is not |
855 | available as well, it issues an error message and terminates. The user can | 855 | available as well, it issues an error message and terminates. The user can |
856 | select the refiling method using the B<--refile-method> option. See the | 856 | select the refiling method using the B<--refile-method> option. See the |
857 | B<BUGS> section for details. |