summaryrefslogtreecommitdiffstats
path: root/debian/rewrap.pl
blob: 0fdcb1ecaf2b83dcc12b839a8044419ac821ea49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/perl

use strict;
use Text::Wrap;

$Text::Wrap::columns = 80;

open FH, "<", "debian/description-list";
my @a = <FH>;
foreach(@a) {
  chomp $_;
  if(length($_) > 80) {
    $_ =~ /^(.{30})(.*)$/;
    my $first = $1;
    my $description = $2;
    my $rest = "                              ";
    print $_ . "\n" foreach(wrap($first, $rest, ($description)));
  } else {
    print $_."\n";
  }
}