From 60984a36693b43705d073bf15030b7ab246318c4 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Fri, 9 Dec 2011 22:42:17 +0000 Subject: [PATCH] * ignore dovecot and imap files when figuring out which lists to axe --- update_lists | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/update_lists b/update_lists index b805644..cca8c9b 100755 --- a/update_lists +++ b/update_lists @@ -9,8 +9,8 @@ find bugs -maxdepth 1 -mindepth 1 -type d |perl -ne 'chomp; $a = $_; $b = $a; $ # Remove dead lists #find ~/Maildir/lists/ -type d -maxdepth 1 -mindepth 1|xargs -n 1 -i sh -c '(( $(find "{}" -type f -iname "*" |wc -l) <= 1 )) && rm -rf "{}"' -find ~/Maildir/lists/ -maxdepth 1 -mindepth 1 -type d|xargs -n 1 -i bash -c 'A={}; (( $(find $A -type f -name "*" -not -name "dovecot*" | wc -l) == 0 )) && rm -rf $A' -find ~/Maildir/bugs/ -maxdepth 1 -mindepth 1 -type d|xargs -n 1 -i bash -c 'A={}; (( $(find $A -type f -name "*" -not -name "dovecot*" |wc -l) == 0 )) && rm -rf $A' +find ~/Maildir/lists/ -maxdepth 1 -mindepth 1 -type d|xargs -n 1 -i bash -c 'A={}; (( $(find $A -type f -name "*" -not -name "dovecot*" -not -name ".imap*" -not -name ".customflags" | wc -l) == 0 )) && rm -rf $A' +find ~/Maildir/bugs/ -maxdepth 1 -mindepth 1 -type d|xargs -n 1 -i bash -c 'A={}; (( $(find $A -type f -name "*" -not -name "dovecot*" -not -name ".imap*" -not -name ".customflags" |wc -l) == 0 )) && rm -rf $A' # Remove broken symlinks -find . -maxdepth 1 -mindepth 1 -type l -iname '.*' -not -xtype d -print0 |xargs -0 rm -f \ No newline at end of file +find . -maxdepth 1 -mindepth 1 -type l -iname '.*' -not -xtype d -print0 |xargs -0 rm -f -- 2.39.5