blob: bb60800090bc30ea4dfe933219439b5710ed3ad7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/usr/bin/perl
($noclean, @ARGV) = @ARGV if $ARGV[0] eq "--noclean";
(undef, $root, @ARGV) = @ARGV if $ARGV[0] eq "--distrib";
$root && @ARGV == 0 or die
"usage: genhdlists [--noclean] --distrib <root distrib>
";
$depslist = "$root/Mandrake/base/depslist.ordered";
$hdlist = "$root/Mandrake/base/hdlist";
@dirs = glob("$root/Mandrake/RPMS*");
open F, ">${hdlist}s" or die "unable to open ${hdlist}s";
foreach my $dir (@dirs) {
my $ext = $dir =~ /RPMS(.*)$/ && "$1.cz2";
my $command = "genhdlist_cz2";
$noclean and $command .= " --noclean";
-e $depslist and $command .= " --ordered-depslist $depslist";
$command .= " -o $hdlist$ext $dir";
system($command);
print F `basename $hdlist$ext`;
}
close F;
|