X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/a12a2e5dcccd7d6f012ad4e89a57d24ba5461352..53e76581596fc6d2caffd950feff42117d1abf96:/scripts/installation_check.pl?ds=inline diff --git a/scripts/installation_check.pl b/scripts/installation_check.pl index ba02252af..1cebcb28e 100755 --- a/scripts/installation_check.pl +++ b/scripts/installation_check.pl @@ -124,8 +124,13 @@ sub check_module { my ($module, %role) = @_; my $line = "Looking for $module->{fullname}"; - my $res = SL::InstallationCheck::module_available($module->{"name"}, $module->{version}); - print_result($line, $res); + my ($res, $ver) = SL::InstallationCheck::module_available($module->{"name"}, $module->{version}); + if ($res) { + print_line($line, $ver || 'no version', 'green'); + } else { + print_result($line, $res); + } + return if $res; @@ -179,8 +184,17 @@ sub mycolor { sub print_result { my ($test, $exit) = @_; - print $test, " ", ('.' x (72 - length $test)); - print $exit ? '.... '. mycolor('ok', 'green') : ' '. mycolor('NOT ok', 'red'); + if ($exit) { + print_line($test, 'ok', 'green'); + } else { + print_line($test, 'NOT ok', 'red'); + } +} + +sub print_line { + my ($text, $res, $color) = @_; + print $text, " ", ('.' x (78 - length($text) - length($res))); + print mycolor($res, $color); print "\n"; return; }