diff options
Diffstat (limited to 'local/bin/email-unread')
-rwxr-xr-x | local/bin/email-unread | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/local/bin/email-unread b/local/bin/email-unread deleted file mode 100755 index 3956f3b..0000000 --- a/local/bin/email-unread +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/perl -use strict; -use warnings; -use File::Find; - -use constant EMAIL => glob("~/.mail"); -my $IGNORE = "(Spam|trash|Important)"; - -my $V = (shift || "") eq "-s"; - -opendir(EDIR, EMAIL) or die $!; -while (readdir EDIR) { - next if /^\./ or not (-d EMAIL."/$_"); - our $count = 0; - - sub new_dir { - my $path = substr $File::Find::name, 1 + length EMAIL; - $path =~ s/\/new$//; - return if $_ ne "new" or $path =~ /$IGNORE/; - #print "ok: $path\n"; - my $cnt = 0; - opendir(NDIR, "$File::Find::name") or die $!; - while (readdir NDIR) { - $cnt += 1 unless /^\./; - } - closedir(NDIR); - print "$path: $cnt\n" if not $V and $cnt > 0; - $count += $cnt; - } - find(\&new_dir, EMAIL."/$_"); - - print "$_: $count\n" if $V and $count > 0; -} -closedir(EDIR); |