From: Sven Schöling Date: Wed, 18 Jan 2012 09:34:03 +0000 (+0100) Subject: Dateilistings in find-use optional X-Git-Tag: release-2.7.0beta1~43 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=31d232e6d4470ceea3e600eeebc6c1e668f383df;p=kivitendo-erp.git Dateilistings in find-use optional --- 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;