File: mangle-info

package info (click to toggle)
emacs22-non-dfsg 22.2%2B2-1.1
  • links: PTS
  • area: non-free
  • in suites: lenny
  • size: 12,248 kB
  • ctags: 60
  • sloc: makefile: 714; lisp: 100; perl: 90; sh: 27
file content (17 lines) | stat: -rw-r--r-- 304 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl -w -i

use English;
use strict;

$RS = undef;

my $prefix = $ENV{"DEBIAN_INFO_PREFIX"};

my $x = <>;
if(!($x =~ m/^(\s*START-INFO-DIR-ENTRY\s+\*\s*[^:]+:\s*)\(([^\)]+)\)/mo)) {
  die "Couldn't find START-INFO-DIR-ENTRY.";
}

print ${PREMATCH};
print "$1($prefix/$2)";
print ${POSTMATCH};