summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile16
-rwxr-xr-xbin/mailsync3
-rwxr-xr-xbin/mw2
3 files changed, 7 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index 7b78355..5cd5bf2 100644
--- a/Makefile
+++ b/Makefile
@@ -10,16 +10,12 @@ endif
install:
mkdir -p $(DESTDIR)$(PREFIX)/bin
- for script in bin/*; do \
- cp -f $$script $(DESTDIR)$(PREFIX)/bin/; \
- chmod 755 $(DESTDIR)$(PREFIX)/$$script; \
- done
+ cp -f bin/mw bin/mailsync bin/openfile $(DESTDIR)$(PREFIX)/bin/
+ chmod 755 $(DESTDIR)$(PREFIX)/bin/mw $(DESTDIR)$(PREFIX)/bin/mailsync $(DESTDIR)$(PREFIX)/bin/openfile
mkdir -p $(DESTDIR)$(PREFIX)/share/mutt-wizard
chmod 755 $(DESTDIR)$(PREFIX)/share/mutt-wizard
- for shared in share/*; do \
- cp -f $$shared $(DESTDIR)$(PREFIX)/share/mutt-wizard; \
- chmod 644 $(DESTDIR)$(PREFIX)/share/mutt-wizard/$$(basename $(notdir $$shared)); \
- done
+ cp -f share/mailcap share/domains.csv share/mutt-wizard.muttrc $(DESTDIR)$(PREFIX)/share/mutt-wizard
+ chmod 644 $(DESTDIR)$(PREFIX)/share/mutt-wizard/mailcap $(DESTDIR)$(PREFIX)/share/mutt-wizard/domains.csv $(DESTDIR)$(PREFIX)/share/mutt-wizard/mutt-wizard.muttrc
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
cp -f mw.1 $(DESTDIR)$(MANPREFIX)/man1/mw.1
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/mw.1
@@ -33,9 +29,7 @@ install:
fi
uninstall:
- for script in bin/*; do \
- rm -f $(DESTDIR)$(PREFIX)/$$script; \
- done
+ rm -f $(DESTDIR)$(PREFIX)/bin/mw $(DESTDIR)$(PREFIX)/bin/mailsync $(DESTDIR)$(PREFIX)/bin/openfile
rm -rf $(DESTDIR)$(PREFIX)/share/mutt-wizard
rm -f $(DESTDIR)$(MANPREFIX)/man1/mw.1
diff --git a/bin/mailsync b/bin/mailsync
index fab980a..af7aa6c 100755
--- a/bin/mailsync
+++ b/bin/mailsync
@@ -61,8 +61,7 @@ syncandnotify() {
newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l)
case 1 in
$((newcount > 5)) ) notify "$acc" "$newcount" ;;
- $((newcount > 0)) ) notify "$acc" "$newcount"
- for file in $new; do
+ $((newcount > 0)) ) for file in $new; do
# Extract subject and sender from mail.
from=$(awk '/^From: / && ++n ==1,/^\<.*\>:/' "$file" | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | awk '{ $1=""; if (NF>=3)$NF=""; print $0 }' | sed 's/^[[:blank:]]*[\"'\''\<]*//;s/[\"'\''\>]*[[:blank:]]*$//')
subject=$(awk '/^Subject: / && ++n == 1,/^\<.*\>: / && ++i == 2' "$file" | head -n 1 | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' | sed 's/^Subject: //' | sed 's/^{[[:blank:]]*[\"'\''\<]*//;s/[\"'\''\>]*[[:blank:]]*$//' | tr -d '\n')
diff --git a/bin/mw b/bin/mw
index b29e347..54af276 100755
--- a/bin/mw
+++ b/bin/mw
@@ -236,7 +236,7 @@ getboxes() { if [ -n "${force+x}" ] ; then
*[Jj][Uu][Nn][Kk]*) formatShortcut j junk "$x" ;;
*[Aa][Rr][Cc][Hh][Ii][Vv][Ee]*) formatShortcut a archive "$x" ;;
*[Ss][Pp][Aa][Mm]*) formatShortcut S spam "$x" ;;
- *[Ii][Nn][Bb][Oo][Xx]*) formatShortcut i inbox "$x"; setBox spoolfile "$x" inbox="$x" ;;
+ *[Ii][Nn][Bb][Oo][Xx]) formatShortcut i inbox "$x"; setBox spoolfile "$x" inbox="$x" ;;
esac
done
}