]> git.donarmstrong.com Git - bin.git/blob - update_lists
add reset usb bus command
[bin.git] / update_lists
1 #!/bin/bash
2
3 set -e
4
5 for maildir in Maildir Mail; do
6     if ! [ -e ~/$maildir ]; then
7         continue
8     fi;
9     ( cd ~/$maildir ;
10       for listtype in lists bugs; do
11           find . -maxdepth 1 -mindepth 1 -type d -iname "$listtype"'.*' -print0|
12               xargs -0 -i bash -c 'A={}; (( $(find "$A" -type f -name "*" -not -name "dovecot*" -not -name ".imap*" -not -name ".customflags" | wc -l) == 0 )) && rm -rf "$A"';
13       done;
14       find . -maxdepth 1 -mindepth 1 -type l -iname '.*' -not -xtype d -delete;
15     );
16     exit 0;
17 done;