projects
/
scripts.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
*** empty log message ***
[scripts.git]
/
gma.sh
diff --git
a/gma.sh
b/gma.sh
index
640c7f3
..
1e79c72
100755
(executable)
--- a/
gma.sh
+++ b/
gma.sh
@@
-20,7
+20,7
@@
set -e
function usage () {
set -e
function usage () {
- echo "gma.sh [--body] [--from|--to|--fromto] <pattern> [<year>]"
+ echo "gma.sh [--body] [--
keepspam] [--subject|--
from|--to|--fromto] <pattern> [<year>]"
}
RESULT_MBOX="/tmp/gma"
}
RESULT_MBOX="/tmp/gma"
@@
-61,8
+61,15
@@
while [[ $1 ]]; do
RE_PREFIX="^(From|To):.*"
;;
RE_PREFIX="^(From|To):.*"
;;
+ "--subject")
+ RE_PREFIX="^Subject:.*"
+ ;;
+
*)
if [[ ${PATTERN} ]]; then
*)
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
if [[ ${FILE_PATTERN} ]]; then
usage
exit 1
@@
-84,7
+91,7
@@
if [[ -z "${PATTERN}" ]]; then
fi
[[ ${FILE_PATTERN} ]] || FILE_PATTERN="${MAIL_ARCHIVE_DIR}/*/*/*"
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" ")
SIZE=$(\dus ${SIZE_FILE_PATTERN} | cut -f 1 -d" ")