diff options
author | Francois Pons <fpons@mandriva.com> | 2000-03-10 12:36:16 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2000-03-10 12:36:16 +0000 |
commit | e491014054d64578775f539790da539b8294a42f (patch) | |
tree | 269e0abea15f7699370122a012e62a0ba33fb5b9 /genhdlists | |
parent | ecad1562e7ef9070a2ecce05c05e0b431dc2045a (diff) | |
download | rpmtools-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-- | genhdlists | 27 |
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; |