summaryrefslogtreecommitdiffstats
path: root/.bin/get-mailbox-local
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2022-01-04 18:16:12 +0100
committerRomain Gonçalves <me@rgoncalves.se>2022-01-04 18:16:12 +0100
commite7b2188fe8dd715603dbd509fc62de6e872933a2 (patch)
tree8f31b14f0958d2b7acc9c41f940156e0822f22c4 /.bin/get-mailbox-local
parentf7ba6813339a00e45959c10c96b249326419c10b (diff)
downloaddots-e7b2188fe8dd715603dbd509fc62de6e872933a2.tar.gz
Tue Jan 4 06:16:12 PM CET 2022
Diffstat (limited to '.bin/get-mailbox-local')
-rwxr-xr-x.bin/get-mailbox-local11
1 files changed, 11 insertions, 0 deletions
diff --git a/.bin/get-mailbox-local b/.bin/get-mailbox-local
new file mode 100755
index 0000000..b579016
--- /dev/null
+++ b/.bin/get-mailbox-local
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+root_dir=$(readlink -f ${1})
+
+mailboxes=$(find "${1}" -name "cur" |
+ xargs dirname |
+ sed "s@$root_dir/@+@g" |
+ grep "${2:-.*}" |
+ sort)
+
+echo ${mailboxes}
remember that computers suck.