X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=scripts%2Ffind-use.pl;h=90242211094eed6e4cb05648e28f0b68f81e5914;hb=ac557528e518920d66ffe4f8138660440de518e0;hp=f65143ee6e388350cf3ec1431cd3cacc2d0a6a51;hpb=26a34e3320547212a2718d8de05da44bd14f6b47;p=kivitendo-erp.git diff --git a/scripts/find-use.pl b/scripts/find-use.pl index f65143ee6..902422110 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); @@ -37,6 +38,10 @@ my (%uselines, %modules, %supplied, %requires); } ); +GetOptions( + 'files-with-match|l' => \ my $l, +); + find(sub { return unless /(\.p[lm]|console)$/; @@ -118,8 +123,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;