| 1 |
#! /usr/bin/perl |
| 2 |
use warnings; |
| 3 |
use strict; |
| 4 |
use integer; |
| 5 |
use FindBin; |
| 6 |
use lib $FindBin::RealBin; |
| 7 |
use Def; |
| 8 |
|
| 9 |
our %opt = map {$_=>1} @ARGV; |
| 10 |
# The present version provides no options. |
| 11 |
|
| 12 |
# You do not need this optional helper script to install, use, modify, |
| 13 |
# develop, build, package or distribute `debram'. If you are developing |
| 14 |
# the debram, however, you may possibly find the script convenient. |
| 15 |
# |
| 16 |
# This brief script strips the top- and bottommatter from debram.txt. |
| 17 |
# It acts as a filter, taking the full debram.txt on stdin, printing the |
| 18 |
# stripped debram.txt on stdout. It also verifies that each ram shows |
| 19 |
# the correct package count. |
| 20 |
|
| 21 |
1 while <> ne $Def::mark_main_body; <>; |
| 22 |
$/ = ''; |
| 23 |
while ( <> ) { |
| 24 |
chomp; $_ .= "\n\n"; |
| 25 |
my @c; push @c, $1 while s/\A(.*\n)//; |
| 26 |
$c[1] =~ /(\d{4}) .+? \((\d+)\)/ or last; |
| 27 |
@c-4 == $2 or die "miscount on ram $1\n"; |
| 28 |
@c = @c[3..$#c-1] if $opt{strip_title}; |
| 29 |
print @c; |
| 30 |
} |
| 31 |
|