/usr/share/plum/support/modinfo is in plum 1:2.33.1-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | #!/usr/bin/perl -w
# $Id: modinfo,v 2.9 1998/11/11 03:25:45 hasegawa Exp $
# copyright (c)1997-1998 Yoshinori Hasegawa <hasegawa@madoka.org>
&main(@ARGV);
sub main {
local(@args) = @_;
local($dir);
if (!@args) {
&usage();
exit(1);
}
$dir = shift(@args);
&traverse("$dir/module", '');
}
sub traverse {
local($base, $dir) = @_;
local(@files, $file);
opendir(DIR, "$base/$dir") || die;
@files = readdir(DIR);
closedir(DIR);
foreach $file (sort(@files)) {
next if $file =~ /^\./;
next if $file eq 'SCCS';
next if $file eq 'RCS';
next if $file eq 'CVS';
next if $file =~ /\,v$/;
if (-d "$base/$dir/$file") {
if ($dir) {
&traverse($base, "$dir/$file");
} else {
&traverse($base, $file);
}
} elsif ($file =~ /\.plm/) {
if ($dir) {
print "<DT><A HREF=\"../module/$dir/$file\">$dir/$file\n";
print "</A></DT>";
&info("$base/$dir/$file", "$dir/$file");
} else {
print "<DT><A HREF=\"../module/$file\">$file\n";
print "</A></DT>";
&info("$base/$file", $file);
}
}
}
}
sub info {
local($file, $name) = @_;
if (open(FILE, $file)) {
while (defined($line = <FILE>)) {
$line =~ tr/\r\n//d;
last if $line eq '__END__';
}
while (defined($line = <FILE>)) {
$line =~ tr/\r\n//d;
if ($line =~ /^\s*$name\s*\-\s*(.*)$/) {
print "<DD> $1\n";
print "</DD>\n";
}
}
close(FILE);
}
}
sub usage {
print 'usage: perl modinfo <plum-top-directory>', "\n";
}
|