aboutsummaryrefslogtreecommitdiff
path: root/local/bin/email-unread
diff options
context:
space:
mode:
Diffstat (limited to 'local/bin/email-unread')
-rwxr-xr-xlocal/bin/email-unread33
1 files changed, 0 insertions, 33 deletions
diff --git a/local/bin/email-unread b/local/bin/email-unread
deleted file mode 100755
index dec7d04..0000000
--- a/local/bin/email-unread
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env 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/;
- 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);