X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=scripts%2Ffind-use.pl;h=959ecbedbc2c5ca7b3c714b8367492b4fa45a29c;hb=a8f5fe51824487af16bf580be9262b6fbe68a64a;hp=f65143ee6e388350cf3ec1431cd3cacc2d0a6a51;hpb=26a34e3320547212a2718d8de05da44bd14f6b47;p=kivitendo-erp.git diff --git a/scripts/find-use.pl b/scripts/find-use.pl index f65143ee6..959ecbedb 100755 --- a/scripts/find-use.pl +++ b/scripts/find-use.pl @@ -5,6 +5,7 @@ use File::Find; use Module::CoreList; use SL::InstallationCheck; use Term::ANSIColor; +use Getopt::Long; my (%uselines, %modules, %supplied, %requires); @@ -34,13 +35,24 @@ my (%uselines, %modules, %supplied, %requires); }, 'Devel::REPL' => { 'namespace::clean' => 1, - } + }, + 'Email::MIME' => { + 'Email::MIME::Creator' => 1, + }, + 'Test::Harness' => { + 'TAP::Parser' => 1, + 'TAP::Parser::Aggregator' => 1, + }, +); + +GetOptions( + 'files-with-match|l' => \ my $l, ); find(sub { return unless /(\.p[lm]|console)$/; - # remember modules shipped with Lx-Office + # remember modules shipped with kivitendo $supplied{modulize($File::Find::name)}++ if $File::Find::dir =~ m#modules/#; @@ -101,6 +113,11 @@ for my $useline (keys %uselines) { } } +# have all documented modules mentioned here +$modules{$_->{name}} ||= { status => 'required' } for @SL::InstallationCheck::required_modules; +$modules{$_->{name}} ||= { status => 'optional' } for @SL::InstallationCheck::optional_modules; +$modules{$_->{name}} ||= { status => 'developer' } for @SL::InstallationCheck::developer_modules; + # build transitive closure for documented dependancies my $changed = 1; while ($changed) { @@ -118,8 +135,12 @@ while ($changed) { } } -print sprintf "%8s : %s (%s)", color_text($modules{$_}->{status}), $_, join(' ', @{ $modules{$_}->{files} || [] }) - for sort { +do { + print sprintf "%8s : %s", color_text($modules{$_}->{status}), $_; + if ($l) { + print " $_" for @{ $modules{$_}->{files} || [] }; + } +} for sort { $modules{$a}->{status} cmp $modules{$b}->{status} || $a cmp $b } keys %modules; @@ -221,5 +242,3 @@ Sven Schöling Es.schoeling@linet-services.deE Distributed under the terms of the GNU General Public License v2. =cut - -