Browse Source

stupid fix and cli feedback

pull/908/head
Luke Smith 1 year ago
parent
commit
6e44eb5056
No known key found for this signature in database GPG Key ID: 4C50B54A911F6252
2 changed files with 6 additions and 4 deletions
  1. +5
    -3
      bin/mailsync
  2. +1
    -1
      bin/mw

+ 5
- 3
bin/mailsync View File

@@ -63,9 +63,11 @@ syncandnotify() {
"$HOME/.local/share/mail/$2/"[Ii][Nn][Bb][Oo][Xx]/cur/ \ "$HOME/.local/share/mail/$2/"[Ii][Nn][Bb][Oo][Xx]/cur/ \
-type f -newer "$lastrun" 2> /dev/null) -type f -newer "$lastrun" 2> /dev/null)
newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l) newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l)
[ -z "$MAILSYNC_MUTE" ] && case 1 in
$((newcount > 0)) ) notify "$2" "$newcount" ;;
esac
case "$newcount" in
0) echo "No new mail for $2." ;;
*) echo "$newcount new mail for $2."
[ -z "$MAILSYNC_MUTE" ] && notify "$2" "$newcount" ;;
esac
} }


allaccounts="$(grep -hs "^\(Channel\|account\)" "$MBSYNCRC" "$MPOPRC")" allaccounts="$(grep -hs "^\(Channel\|account\)" "$MBSYNCRC" "$MPOPRC")"


+ 1
- 1
bin/mw View File

@@ -21,7 +21,6 @@ notmuchtemp="$muttshare/notmuch-temp"
# With the use of templates, it's impossible to use parameter substitution. # With the use of templates, it's impossible to use parameter substitution.
# Therefore, some default variables that might be otherwise overwritten are set # Therefore, some default variables that might be otherwise overwritten are set
# here. # here.
folder="$maildir/$fulladdr"
iport="993" iport="993"
sport="465" sport="465"
imapssl="IMAPS" imapssl="IMAPS"
@@ -135,6 +134,7 @@ askinfo() { \
echo "$fulladdr is not a valid email address. Please retype the address:" echo "$fulladdr is not a valid email address. Please retype the address:"
read -r fulladdr read -r fulladdr
done done
folder="$maildir/$fulladdr"
getaccounts; echo "$accounts" | grep -q "\s$fulladdr$" 2>/dev/null && getaccounts; echo "$accounts" | grep -q "\s$fulladdr$" 2>/dev/null &&
{ echo "$fulladdr has already been added" && exit 1 ;} { echo "$fulladdr has already been added" && exit 1 ;}
{ [ -z "$imap" ] || [ -z "$smtp" ] ;} && parsedomains { [ -z "$imap" ] || [ -z "$smtp" ] ;} && parsedomains


Loading…
Cancel
Save