executable_gpg-unlock 719 B

12345678910111213141516171819202122
  1. #!/usr/bin/env bash
  2. exec > /dev/null
  3. set -eu
  4. if [ -f "$HOME/.password-store/www.majordomo.ru/gpg/master.gpg" ]
  5. then
  6. gpg --decrypt --quiet --for-your-eyes-only --no-tty \
  7. --pinentry-mode loopback \
  8. --passphrase "$(pass show www.majordomo.ru/gpg/master)" \
  9. "$HOME/.password-store/majordomo/private/eng/old.gpg"
  10. fi
  11. if [ -f "$HOME/.password-store/majordomo/private/eng/old.gpg" ]
  12. then
  13. gpg --decrypt --quiet --for-your-eyes-only --no-tty \
  14. --pinentry-mode loopback \
  15. --passphrase "$(pass show majordomo/private/eng/old)" \
  16. "$HOME/.password-store/majordomo/public/router4/root.gpg"
  17. fi