From 7e3041c2715d4f111a5dca4c58722435c223e539 Mon Sep 17 00:00:00 2001 From: Patrick Neumann Date: Tue, 9 Apr 2019 11:28:30 +0200 Subject: [PATCH] last improvements --- extract-and-index-evolution-mail-storage | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/extract-and-index-evolution-mail-storage b/extract-and-index-evolution-mail-storage index 705cfca..183fc4d 100755 --- a/extract-and-index-evolution-mail-storage +++ b/extract-and-index-evolution-mail-storage @@ -131,6 +131,7 @@ for DIR in ${DIRS} ; do #----------------------------------------------------------------------------- # Create target folder structure recursively: #----------------------------------------------------------------------------- + # because fls does not support "-0" we have to improve... IFS=$'\n' for dir in ${dirs} ; do path="$( echo "${dir}" | cut -d "|" -f 2 )" @@ -154,6 +155,7 @@ for DIR in ${DIRS} ; do #----------------------------------------------------------------------------- # Extract files recursively into target folder(s): #----------------------------------------------------------------------------- + # because fls does not support "-0" we have to improve... IFS=$'\n' for file in ${files} ; do inode="$( echo "${file}" | cut -d "|" -f 3 )" @@ -179,16 +181,9 @@ done #------------------------------------------------------------------------------- echo "Indexing mails... please wait..." -mailboxes="$( find "${T_PRE}${S_PRE}/${user}" \ +find "${T_PRE}${S_PRE}/${user}" \ -type d \( -name "cur" -or -name "new" -or -name "tmp" \) \ - -exec dirname '{}' \; )" - -IFS=$'\n' -for mailbox in ${mailboxes} ; do - # \""${mailbox}\"" because: spaces are more evil as expected - mu index --quiet --muhome="${PRE}/mu" --maildir=\""${mailbox}\"" -done -unset IFS + -exec mu index --quiet --muhome="${PRE}/mu" --maildir="'{}'" \; echo "Done."