%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/share/doc/popularity-contest/examples/bin/
Upload File :
Create Path :
Current File : //usr/share/doc/popularity-contest/examples/bin/gensections.pl

#! /usr/bin/perl -wT

my $mirrorbase = "/srv/mirrors/debian";
my $docurlbase = "";

$ENV{PATH}="/bin:/usr/bin";

for (glob("$mirrorbase/dists/stable/*/binary-*/Packages.xz"))
{
  /([^[:space:]]+)/ or die("incorrect package name");
  $file = $1;#Untaint
  open AVAIL, "-|:encoding(UTF-8)","xzcat $file";
  while(<AVAIL>)
  {
/^Package: (.+)/  and do {$p=$1;next;};
/^Section: (.+)/ or next;
          $section{$p}=$1;
  }
  close AVAIL;
}
@pkgs=sort keys %section;
for (@pkgs)
{
  print "$_ $section{$_}\n";
}

Zerion Mini Shell 1.0