aboutsummaryrefslogtreecommitdiffstats
path: root/genhdlists
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-03-10 12:36:16 +0000
committerFrancois Pons <fpons@mandriva.com>2000-03-10 12:36:16 +0000
commite491014054d64578775f539790da539b8294a42f (patch)
tree269e0abea15f7699370122a012e62a0ba33fb5b9 /genhdlists
parentecad1562e7ef9070a2ecce05c05e0b431dc2045a (diff)
downloadrpmtools-e491014054d64578775f539790da539b8294a42f.tar
rpmtools-e491014054d64578775f539790da539b8294a42f.tar.gz
rpmtools-e491014054d64578775f539790da539b8294a42f.tar.bz2
rpmtools-e491014054d64578775f539790da539b8294a42f.tar.xz
rpmtools-e491014054d64578775f539790da539b8294a42f.zip
*** empty log message ***
Diffstat (limited to 'genhdlists')
-rw-r--r--genhdlists27
1 files changed, 27 insertions, 0 deletions
diff --git a/genhdlists b/genhdlists
new file mode 100644
index 0000000..bb60800
--- /dev/null
+++ b/genhdlists
@@ -0,0 +1,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;