dot

packages and services management
Log | Files | Refs | README

commit 33bb4fc8e84e012106a4d2a90304c2f1832f2011
parent 7e4d9d04633101472f4d2d1c1d0d6557d1fcfffb
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sun,  3 Dec 2017 19:37:37 +0100

use xargs instead of a loop

Diffstat:
Mbin/etc | 4++--
Mbin/mblaze-filter | 6++----
2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/bin/etc b/bin/etc @@ -5,11 +5,11 @@ case $1 in (dot) cd "$ETC/dot" || exit 1 find * -type d -exec mkdir -p "$HOME/.{}" ';' - find * -type f -exec ln -fs "$ETC/dot/{}" "$HOME/.{}" ';' + find * ! -type d -exec ln -fs "$ETC/dot/{}" "$HOME/.{}" ';' find -L "$HOME" -maxdepth 3 -type l -exec rm {} + cd "$ETC/config" || exit 1 find * -type d -exec mkdir -p "$HOME/.config/{}" ';' - find * -type f -exec ln -fs "$ETC/config/{}" "$HOME/.config/{}" ';' + find * ! -type d -exec ln -fs "$ETC/config/{}" "$HOME/.config/{}" ';' find -L "$HOME" -maxdepth 3 -type l -exec rm {} + ;; (mkdir) diff --git a/bin/mblaze-filter b/bin/mblaze-filter @@ -1,7 +1,7 @@ #!/bin/sh # filter mails using mblaze -minc "$MAIL" | mscan | $PAGER +minc "$MAIL" | mscan while read -r dir test do @@ -9,9 +9,7 @@ do mkdir -p "${MAIL%/*}/$dir/new" mkdir -p "${MAIL%/*}/$dir/tmp" printf '%-25s ' "$dir" - mlist "$MAIL" | mpick -t "$test" | while IFS='' read -r mail - do mv "$mail" "${MAIL%/*}/$dir/new" - done + mlist "$MAIL" | mpick -t "$test" | xargs -rI {} mv {} "$MAIL/../dir/new" done << 'EOF' actux.eu.org "Reply-To" ~~~ "*@actux.eu.org*" amazon.com "From" ~~~ "*@amazon.*"