Archived
1
0
Fork 0
This repository has been archived on 2024-10-31. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/simpleDots/bin/decryptNdump_pass

22 lines
487 B
Text
Raw Permalink Normal View History

2022-04-23 20:54:44 +02:00
#!/bin/bash
## A script to decrypt and dump the passwordstore to
## save it to a trusted volume
prefix=${PASSWORD_STORE_DIR:=~/.password-store}
## Set the IFS to account for spaces in filenames
IFS=$(echo -en "\n\b")
for file in $(find $prefix -name '*.gpg')
do
nicename=$(echo $file \
| cut --characters ${#prefix}- \
| cut --characters 3- \
| rev | cut --characters 5- | rev
)
echo
echo "==> "$nicename
gpg --quiet --decrypt $file
done