X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=scripts.git;a=blobdiff_plain;f=gma.sh;h=1e79c72c96bbf3ba7d183730e433bdd3127aa3fe;hp=46992a38834d45c3d4a3196285aa4ef2a451d375;hb=20794e99b3635c6b364f536631d779f8f3d78b28;hpb=8dfa1963e55ead8a842115a970fc3f99a1803cc6 diff --git a/gma.sh b/gma.sh index 46992a3..1e79c72 100755 --- a/gma.sh +++ b/gma.sh @@ -67,6 +67,9 @@ while [[ $1 ]]; do *) if [[ ${PATTERN} ]]; then + # If we already have the pattern to match in the + # message, get the new argument as a pattern for the + # filename if [[ ${FILE_PATTERN} ]]; then usage exit 1 @@ -88,7 +91,7 @@ if [[ -z "${PATTERN}" ]]; then fi [[ ${FILE_PATTERN} ]] || FILE_PATTERN="${MAIL_ARCHIVE_DIR}/*/*/*" -[[ ${SIZE_FILE_PATTERN} ]] || SIZE_FILE_PATTERN="${MAIL_ARCHIVE_DIR}/" +[[ ${SIZE_FILE_PATTERN} ]] || SIZE_FILE_PATTERN="${MAIL_ARCHIVE_DIR}" SIZE=$(\dus ${SIZE_FILE_PATTERN} | cut -f 1 -d" ")