fi
target_dir="${basedir}"$(echo "${tag}" | cut -c5-)"/cur/"
for f in $(notmuch search --output=files tag:"${tag}"); do
- echo DEBUG0 $f
new_name=$(basename "${f}" | sed -e 's/,U=[0-9]*//')
- echo DEBUG0 $new_name
target_path="${target_dir}${new_name}"
- echo DEBUG0 $target_path
if [ ! "${target_path}" = "${f}" ]; then
echo "Moving ${f} to ${target_path}."
mv "${f}" "${target_path}"