Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. creds_reencrypt_everything() {
  2. local name
  3. local credentials
  4. local username
  5. local password
  6.  
  7. shopt -s nullglob
  8. for file in "${CREDS_DIR}/"*.creds; do
  9. name="${file%.creds}"
  10. credentials="$(creds_run_gpg -d "$(creds_file "${name}")")"
  11. username="$(< "${credentials}" sed -n '1p')"
  12. password="$(< "${credentials}" sed -n '2p')"
  13. creds_save_credentials "${name}" "${CREDS_REENCRYPT}" "${username}" "${password}"
  14. done
  15. shopt -u nullglob
  16.  
  17. if creds_has_git; then
  18. creds_git commit -m "${CREDS_REENCRYPT}"
  19. fi
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement