summaryrefslogtreecommitdiffstats
path: root/bin/tozt
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-07-10 16:00:59 -0400
committerJesse Luehrs <doy@tozt.net>2021-07-10 16:00:59 -0400
commit5120b108ca2dcd78db519226516e071aca7b81d0 (patch)
treebd2d471d4e16b757b0dac2a7fc470b5caacfb5eb /bin/tozt
parent7946924e237e059bb1b8ca311824042f69396e66 (diff)
downloadconf-5120b108ca2dcd78db519226516e071aca7b81d0.tar.gz
conf-5120b108ca2dcd78db519226516e071aca7b81d0.zip
shfmt everything
Diffstat (limited to 'bin/tozt')
-rwxr-xr-xbin/tozt/learn_spam14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/tozt/learn_spam b/bin/tozt/learn_spam
index 128ca9a..75e500a 100755
--- a/bin/tozt/learn_spam
+++ b/bin/tozt/learn_spam
@@ -17,21 +17,21 @@ fi
if [ ! "$1" = "-q" ]; then
echo "$(date): Learning ham..."
fi
-nice find $MAILDIR -type f | \
- perl -nl0e'chomp; ($ts) = /(\d{10})/; $now = time; print if m{/(new|cur)/} && !m{/(\.old|\.spam)/} && $ts > $now - 60*60*24*30' | \
- xargs -n1000 -0 $SALEARN "$OPTS" --ham > $OUTFILE
+nice find $MAILDIR -type f |
+ perl -nl0e'chomp; ($ts) = /(\d{10})/; $now = time; print if m{/(new|cur)/} && !m{/(\.old|\.spam)/} && $ts > $now - 60*60*24*30' |
+ xargs -n1000 -0 $SALEARN "$OPTS" --ham >$OUTFILE
if [ ! "$1" = "-q" ]; then
echo "$(date): Learning spam..."
fi
-nice find $MAILDIR -type f | \
- perl -nl0e'chomp; ($ts) = /(\d{10})/; $now = time; print if m{/(new|cur)/} && m{/\.spam/} && $ts > $now - 60*60*24*30' | \
- xargs -n1000 -0 $SALEARN "$OPTS" --spam > $OUTFILE
+nice find $MAILDIR -type f |
+ perl -nl0e'chomp; ($ts) = /(\d{10})/; $now = time; print if m{/(new|cur)/} && m{/\.spam/} && $ts > $now - 60*60*24*30' |
+ xargs -n1000 -0 $SALEARN "$OPTS" --spam >$OUTFILE
if [ ! "$1" = "-q" ]; then
echo "$(date): Syncing..."
fi
-nice $SALEARN --sync > $OUTFILE
+nice $SALEARN --sync >$OUTFILE
if [ ! "$1" = "-q" ]; then
echo "$(date): Done!"