Revision 31d232e6
Von Sven Schöling vor fast 13 Jahren hinzugefügt
scripts/find-use.pl | ||
---|---|---|
5 | 5 |
use Module::CoreList; |
6 | 6 |
use SL::InstallationCheck; |
7 | 7 |
use Term::ANSIColor; |
8 |
use Getopt::Long; |
|
8 | 9 |
|
9 | 10 |
my (%uselines, %modules, %supplied, %requires); |
10 | 11 |
|
... | ... | |
37 | 38 |
} |
38 | 39 |
); |
39 | 40 |
|
41 |
GetOptions( |
|
42 |
'files-with-match|l' => \ my $l, |
|
43 |
); |
|
44 |
|
|
40 | 45 |
find(sub { |
41 | 46 |
return unless /(\.p[lm]|console)$/; |
42 | 47 |
|
... | ... | |
118 | 123 |
} |
119 | 124 |
} |
120 | 125 |
|
121 |
print sprintf "%8s : %s (%s)", color_text($modules{$_}->{status}), $_, join(' ', @{ $modules{$_}->{files} || [] }) |
|
122 |
for sort { |
|
126 |
do { |
|
127 |
print sprintf "%8s : %s", color_text($modules{$_}->{status}), $_; |
|
128 |
if ($l) { |
|
129 |
print " $_" for @{ $modules{$_}->{files} || [] }; |
|
130 |
} |
|
131 |
} for sort { |
|
123 | 132 |
$modules{$a}->{status} cmp $modules{$b}->{status} |
124 | 133 |
|| $a cmp $b |
125 | 134 |
} keys %modules; |
Auch abrufbar als: Unified diff
Dateilistings in find-use optional