rp

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

commit fa50429210da1d9cad2c456ef835584d4ea27e68
parent 0db6f7dd783a2dc0b1529837ac848231d05c42cb
Author: parazyd <parazyd@dyne.org>
Date:   Mon, 23 Apr 2018 08:29:53 +0200

rpgenc: Better autorecognition of PGP keys.

Diffstat:
Mbin/rpgenc | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/rpgenc b/bin/rpgenc @@ -7,7 +7,7 @@ email="$(cat)" if [ $# -gt 0 ]; then to="-r $1" else - to="-r $(echo "$email" | rpheaders To)" + to="-r $(echo "$email" | rpheaders To | awk -F'<' '{print $NF}' | tr -d '><')" fi headers="$(printf "$email" | \ @@ -22,7 +22,7 @@ emabody="$(printf "$email" | sed '1,/^$/d' )" emabody="$(printf "$email" | sed '1,/^\r/d' )" -encr="$(echo "$emabody" | sed 's/$/\r/' | gpg -eaq --batch $to)" +encr="$(echo "$emabody" | sed 's/$/\r/' | gpg -eaq --batch "$to" -)" cat <<EOF $headers