From 451d9451b6c1631ba2b83dc70733fc82eec37a47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Faikl=20=28astro=29?= Date: Wed, 26 Jul 2023 14:43:26 +0200 Subject: [PATCH] move oauth token file to pass store --- bin/mw | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/mw b/bin/mw index b554401..191b20e 100755 --- a/bin/mw +++ b/bin/mw @@ -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