Skip to content

Commit

Permalink
move oauth token file to pass store
Browse files Browse the repository at this point in the history
  • Loading branch information
rampaq committed Jul 26, 2023
1 parent df629a1 commit cb610e2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/mw
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,12 @@ askinfo() {
if [ -f "$oauthtokenfile" ]; then
authtype_msmtp=xoauth2
authtype_mbsync=XOAUTH2
printf "Token will be moved to '%s', do you want to remove the original token file [y/N]? " "$PASSWORD_STORE_DIR/$prefix$fulladdr.tokens"
read -r prompt
case "$prompt" in
y|Y) mv "$oauthtokenfile" "$PASSWORD_STORE_DIR/$prefix$fulladdr.tokens" ;;
*) cp "$oauthtokenfile" "$PASSWORD_STORE_DIR/$prefix$fulladdr.tokens" ;;
esac
else
[ -n "$oauthtokenfile" ] && echo "Token file not found"
authtype_msmtp=on
Expand Down

0 comments on commit cb610e2

Please sign in to comment.