rp

simple email tools
git clone https://git.parazyd.org/rp
Log | Files | Refs | README | LICENSE

commit aeda40ca26a0390f913f3478b48e1c46def8dfdf
parent e2cdca99c1f131d167a17a2a38715d7cc9a06063
Author: parazyd <parazyd@dyne.org>
Date:   Wed, 28 Feb 2018 20:33:38 +0100

Remove ebegin calls in scripts.

Diffstat:
Mbin/rpabook | 4++--
Mbin/rpinit | 2+-
Mbin/rppeek | 4++--
Mbin/rpsend | 10+++++-----
Mbin/rpsync | 2+-
Mrplib/common.sh | 3---
6 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/bin/rpabook b/bin/rpabook @@ -11,13 +11,13 @@ usage() { } comp() { - ebegin "searching for $1 in addressbook" + einfo "searching for $1 in addressbook" abook --datafile "$profile/whitelist.abook" --mutt-query "$1" return $? } add() { - ebegin "adding $1 to whitelist" + einfo "adding $1 to whitelist" abook --datafile "$profile/whitelist.abook" --add-email-quiet return $? } diff --git a/bin/rpinit b/bin/rpinit @@ -5,7 +5,7 @@ shareprefix="SHAREPREFIX" . "$shareprefix"/rplib/common.sh setupmutt() { - ebegin "copying mutt files" + einfo "copying mutt files" mkdir -p "$HOME/.rp/$1/mutt" touch "$HOME/.rp/$1/mutt/muttpass" for i in $(ls -1 $shareprefix/mutt); do diff --git a/bin/rppeek b/bin/rppeek @@ -24,12 +24,12 @@ for i in $@; do esac done -ebegin "asking imap password from pass" +einfo "asking imap password from pass" askmuttpass .rp/$(readlink $profile)/imaplocal ( sleep 2; printf "set imap_pass = a\n" > $profile/mutt/muttpass ) & -ebegin "starting up mutt" +einfo "starting up mutt" mutt -F $profile/muttrc \ -f imap://${imap2user}@${imap2host}:${imap2port}/${folder} diff --git a/bin/rpsend b/bin/rpsend @@ -33,7 +33,7 @@ for i in $@; do exit 0 ;; -a) - ebegin "sending all available emails" + einfo "sending all available emails" for i in $(rpsend -l); do rpsend < "$i" && rm -f "$i" done @@ -48,10 +48,10 @@ done email="$(cat)" echo >&2 -ebegin "smtp send via $imap1host" +einfo "smtp send via $imap1host" if ! [ -f "$profile/smtp-fingerprint" ]; then - ebegin "no saved tls certificate fingerprint found. going tofu" + einfo "no saved tls certificate fingerprint found. going tofu" getfingerprint $imap1host 587 > "$profile"/smtp-fingerprint fi @@ -85,10 +85,10 @@ EOF _subj="$(printf "$email" | grep -i '^subject: ' | cut -d: -f2 | cut -c2-)" _dest="$(printf "$email" | grep -i '^to: ' | cut -d: -f2 | cut -c2-)" -ebegin "sending using msmtp" +einfo "sending using msmtp" einfo "subject: $_subj" einfo "to: $_dest" -ebegin "sending $(humansize $(printf "$email\n" | wc -c)) over the network" +einfo "sending $(humansize $(printf "$email\n" | wc -c)) over the network" printf "$email\n" | msmtp "$dryrun" \ diff --git a/bin/rpsync b/bin/rpsync @@ -33,7 +33,7 @@ done ping -c 1 "$imap1host" || edie "$imap1host unreachable" -ebegin "starting imapsync" +einfo "starting imapsync" [ -n "$delete" ] && ewarn "remote deletion enabled" [ -n "$dryrun" ] && ewarn "dry run enabled" imapsync \ diff --git a/rplib/common.sh b/rplib/common.sh @@ -16,9 +16,6 @@ red="$(tput setaf 1)" boldred="${red}$(tput bold)" alertformat="${red}$(tput bold; tput blink)" -ebegin() { - printf "${boldgreen} * ${reset}%s ...\n" "$*" >&2 -} einfo() { printf "${boldgreen} * ${reset}%s\n" "$*" >&2