X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/5cf44d1d8544fa3426e5fd80108187fefae30df9..4347f0dfd8aa1e4c54a08f26e2d8eb5d489d41b2:/scripts/installation_check.pl diff --git a/scripts/installation_check.pl b/scripts/installation_check.pl index 1cebcb28e..03b0ae574 100755 --- a/scripts/installation_check.pl +++ b/scripts/installation_check.pl @@ -62,7 +62,7 @@ if ($check{l}) { sub check_latex { my ($res) = check_kpsewhich(); - print_result("Looking for LaTeX kpsewhich", $res ? ('ok', 'green') : ('NOT ok', 'red')); + print_result("Looking for LaTeX kpsewhich", $res); if ($res) { check_template_dir($_) for SL::InstallationCheck::template_dirs($master_templates); } @@ -126,7 +126,8 @@ sub check_module { my $line = "Looking for $module->{fullname}"; my ($res, $ver) = SL::InstallationCheck::module_available($module->{"name"}, $module->{version}); if ($res) { - print_line($line, $ver || 'no version', 'green'); + my $ver_string = ref $ver && $ver->can('numify') ? $ver->numify : $ver ? $ver : 'no version'; + print_line($line, $ver_string, 'green'); } else { print_result($line, $res); } @@ -193,10 +194,7 @@ sub print_result { sub print_line { my ($text, $res, $color) = @_; - print $text, " ", ('.' x (78 - length($text) - length($res))); - print mycolor($res, $color); - print "\n"; - return; + print $text, " ", ('.' x (78 - length($text) - length($res))), " ", mycolor($res, $color), $/; } sub print_header {