projects
/
scripts.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update.
[scripts.git]
/
gma.sh
diff --git
a/gma.sh
b/gma.sh
index
6b0c518
..
d914893
100755
(executable)
--- a/
gma.sh
+++ b/
gma.sh
@@
-20,10
+20,11
@@
set -e
function usage () {
set -e
function usage () {
- echo "gma.sh [--body] [--
keep
spam] [--subject|--from|--to|--fromto|--sender] <pattern> [<year>]"
+ echo "gma.sh [--body] [--
no
spam] [--subject|--from|--to|--fromto|--sender] <pattern> [<year>]"
}
RESULT_MBOX="/tmp/gma"
}
RESULT_MBOX="/tmp/gma"
+KEEP_SPAM=1
if [[ -z "${MAIL_ARCHIVE_DIR}" ]]; then
echo "Undefined \$MAIL_ARCHIVE_DIR" >&2
if [[ -z "${MAIL_ARCHIVE_DIR}" ]]; then
echo "Undefined \$MAIL_ARCHIVE_DIR" >&2
@@
-55,8
+56,8
@@
while [[ $1 ]]; do
IONICE=""
;;
IONICE=""
;;
- "--
keep
spam")
- KEEP_SPAM=
1
+ "--
no
spam")
+ KEEP_SPAM=
0
;;
"--from")
;;
"--from")
@@
-113,7
+114,7
@@
echo "Looking for ${RE_PREFIX}${PATTERN}"
echo " in ${FILE_PATTERN}"
echo " writing result in ${RESULT_MBOX}"
echo " in ${FILE_PATTERN}"
echo " writing result in ${RESULT_MBOX}"
-if [[ ${KEEP_SPAM} ]]; then
+if [[ ${KEEP_SPAM}
== "1"
]]; then
${IONICE} cat ${FILE_PATTERN} \
| pv -s ${SIZE} -p -t -e - \
${IONICE} cat ${FILE_PATTERN} \
| pv -s ${SIZE} -p -t -e - \