# dist_name: name of the package in cpan if it differs from name (ex.: LWP != libwww-perl)
@required_modules = (
{ name => "parent", url => "http://search.cpan.org/~corion/", debian => 'libparent-perl' },
- { name => "Archive::Zip", version => '1.16', url => "http://search.cpan.org/~phred/", debian => 'libarchive-zip-perl' },
+ { name => "Archive::Zip", version => '12.16', url => "http://search.cpan.org/~phred/", debian => 'libarchive-zip-perl' },
{ name => "Clone", url => "http://search.cpan.org/~rdf/", debian => 'libclone-perl' },
{ name => "Config::Std", url => "http://search.cpan.org/~dconway/", debian => 'libconfig-std-perl' },
{ name => "DateTime", url => "http://search.cpan.org/~drolsky/", debian => 'libdatetime-perl' },
"h|help" => sub { pod2usage(-verbose => 2) },
"c|color!" => \ ( my $c = 1 ),
"i|install-command!" => \ my $apt,
+ "s|silent" => \ $check{s},
);
my %install_methods = (
print_header('Result');
print_line('All', $fail ? 'NOT ok' : 'OK', $fail ? 'red' : 'green');
-if ($default_run) {
+if ($default_run && !$check{s}) {
if (@missing_modules) {
$apt = 1;
print <<"EOL";
}
}
-if (@missing_modules && $apt) {
+if (@missing_modules && $apt && !$check{s}) {
print "\nHere are some sample installation lines, choose one appropriate for your system:\n\n";
local $Text::Wrap::separator = " \\\n";
}
}
+exit !!@missing_modules;
+
sub check_latex {
my ($res) = check_kpsewhich();
print_result("Looking for LaTeX kpsewhich", $res);
sub check_kpsewhich {
return 1 if SL::InstallationCheck::check_kpsewhich();
- print STDERR <<EOL if $v;
+ print STDERR <<EOL if $v && !$check{s};
+------------------------------------------------------------------------------+
Can't find kpsewhich, is there a proper installed LaTeX?
On Debian you may run "aptitude install texlive-base-bin"
print_result("Looking for LaTeX $type_desc $package", $res);
if (!$res) {
- print STDERR <<EOL if $v;
+ print STDERR <<EOL if $v && !$check{s};
+------------------------------------------------------------------------------+
LaTeX $type_desc $package could not be loaded.
my @source_texts = module_source_texts($module);
local $" = $/;
- print STDERR <<EOL if $v;
+ print STDERR <<EOL if $v && !$check{s};
+------------------------------------------------------------------------------+
$module->{fullname} could not be loaded.
sub print_line {
my ($text, $res, $color) = @_;
+ return if $check{s};
print $text, " ", ('.' x (78 - length($text) - length($res))), " ", mycolor($res, $color), $/;
}
sub print_header {
+ return if $check{s};
print $/;
print "$_[0]:", $/;
}