summaryrefslogtreecommitdiff
path: root/scripts/stats.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/stats.pl')
-rwxr-xr-xscripts/stats.pl26
1 files changed, 14 insertions, 12 deletions
diff --git a/scripts/stats.pl b/scripts/stats.pl
index 96fbdf1..fcbcd33 100755
--- a/scripts/stats.pl
+++ b/scripts/stats.pl
@@ -9,7 +9,6 @@ use strict;
use scripts::modules::file;
my %stats;
-my $param = shift;
&recursive(".");
@@ -18,16 +17,19 @@ $stats{"Lines total"} = $stats{"Lines of source"}
+ $stats{"Lines of text"}
+ $stats{"Lines of HTML"};
-unless (defined $param) {
-
- print "$_ = " . $stats{$_} . "\n"
- for ( sort keys %stats );
-
-} else {
-
- print $stats{$_} . " "
- for sort keys %stats;
-
+my $bool = 0;
+foreach ( sort keys %stats )
+{
+ if ($bool == 0)
+ {
+ print "$_ = " . $stats{$_} . "\n";
+ $bool = 1;
+ }
+ else
+ {
+ print "$_ = " . $stats{$_} . "\n";
+ $bool = 0;
+ }
}
print "\n";
@@ -76,7 +78,7 @@ sub filestats
$stats{"Number of script files"}++;
$stats{"Lines of scripts"} += countlines($shift);
}
- elsif ( $shift =~ /(\.txt|[A-Z]+)$/ )
+ elsif ( $shift =~ /(\.txt|README|INSTALL|COPYING|NEWS|SNAPSHOT|ChangeLog)$/ )
{
$stats{"Number of text files"}++;
$stats{"Lines of text"} += countlines($shift);