File: DIVERSIONS

package info (click to toggle)
cruft 0.9.16
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,308 kB
  • sloc: ansic: 803; perl: 315; sh: 178; makefile: 61
file content (13 lines) | stat: -rwxr-xr-x 283 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/perl

open(DIVERT, "/var/lib/dpkg/diversions" ) || die( "Couldn't open diversions info\n");

$x = 0;
while(<DIVERT>) {
	if ($x % 3 == 1) {
		chomp;
		print $_."\n" or die $! if -e $_; # a diversion doesn't necessarily need to be active
	}
	$x++;
}
close STDOUT or die $!;