From 31d232e6d4470ceea3e600eeebc6c1e668f383df Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Wed, 18 Jan 2012 10:34:03 +0100 Subject: [PATCH] Dateilistings in find-use optional --- scripts/find-use.pl | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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; -- 2.20.1