File: mangle-info

package info (click to toggle)
emacs21 21.4a%2B1-5.6
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 59,052 kB
  • ctags: 58,903
  • sloc: lisp: 493,229; ansic: 237,171; xml: 4,262; sh: 4,108; makefile: 2,418; perl: 1,069; cs: 776; asm: 254; csh: 9; sed: 4
file content (17 lines) | stat: -rw-r--r-- 307 bytes parent folder | download | duplicates (15)
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};