blob: 879a882b606a6f2a25e27ad9deecd8c8ccb3bbd1 (
plain) (
tree)
|
|
#!/bin/sh
# Remember to export SSH_ASKPASS=~/.local/bin/ssh-askpass.sh
RESULT=$(pinentry-curses --ttytype=xterm-color --lc-ctype=en_US.UTF8 --ttyname=/dev/tty <<END | grep -E '^(D|ERR)'
SETDESC Enter your SSH password:
SETPROMPT
GETPIN
END
)
if [ "$RESULT" = "ERR 111 canceled" ]; then
exit 255
else
length=$(printf "%s" "$RESULT" | wc -c)
length=$((length))
echo "$RESULT" : '..' | cut -c 3-"$length"
fi
|