/
usr
/
share
/
doc
/
popularity-contest
/
examples
/
bin
/
File Upload :
llllll
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"; }
Copyright ©2k19 -
Hexid
|
Tex7ure