mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-15 07:41:09 -08:00
53 lines
997 B
Perl
53 lines
997 B
Perl
#!/usr/local/perl
|
|
# $HopeName: MMQA_harness!script:commands:help(trunk.4) $
|
|
#
|
|
# provide help on QA functions
|
|
#
|
|
|
|
if (@ARGV) {
|
|
foreach (@ARGV) {
|
|
&printhelp($_);
|
|
}
|
|
} else {
|
|
opendir(DIR, $script_dir."/help");
|
|
|
|
print "Help topics:\n";
|
|
foreach (readdir(DIR)) {
|
|
unless (/^\./) {
|
|
&summhelp($_);
|
|
}
|
|
}
|
|
print "For help on a topic, type 'qa help <topic>'.\n\n";
|
|
print "For general instructions on how to run tests, see guide.mmqa in\n";
|
|
print "the MM Information database.\n";
|
|
|
|
closedir(DIR);
|
|
}
|
|
|
|
sub summhelp {
|
|
local ($infile, $sumline) = @_;
|
|
unless(open(IN, $script_dir."/help/".$infile)) {
|
|
die "File ".$infile." unexpectedly not found.\n";
|
|
}
|
|
$sumline = <IN>;
|
|
close(IN);
|
|
write STDOUT;
|
|
}
|
|
|
|
sub printhelp {
|
|
local ($infile) = @_;
|
|
unless(open(IN, $script_dir."/help/".$infile)) {
|
|
print "No help available on $infile.\n";
|
|
} else {
|
|
<IN>;
|
|
while (<IN>) {
|
|
print $_;
|
|
}
|
|
}
|
|
}
|
|
|
|
format STDOUT =
|
|
@<<<<<<<<<<<@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
|
$infile, $sumline
|
|
.
|
|
|