1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
#! /usr/bin/perl -w
use strict;
# Set up links to doc-linux or doc-linux-nonfree control files, as
# appropriate.
if (@ARGV < 1 or $ARGV[0] !~ /^doc-linux(?:-nonfree)?$/) {
print STDERR "Usage: $0 <doc-linux/doc-linux-nonfree>\n";
exit 1;
}
my $package = $ARGV[0];
opendir DEBIAN, 'debian' or die "Can't open debian directory: $!";
for my $file (readdir DEBIAN) {
next unless $file =~ /^\Q$package\E\.(.*)/;
my $target = "debian/$1";
my $source = "debian/$file";
unlink $target;
link $source, $target or warn "Can't link $source to $target: $!";
}
closedir DEBIAN;
|