Gpg : Decrypt all .gpg files by default.

This commit is contained in:
Dmitry Voronin 2024-09-29 20:57:14 +03:00
parent f727a5f97c
commit 5059f25ad6
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k

View file

@ -19,15 +19,12 @@
}
# Decrypt files to myself.
# Usage: decrypt <FILES>
# Usage: decrypt [FILES]
function decrypt() {
local IFS=$'\n'
local targets=(''${@})
if [[ "''${targets}" = "" ]]; then
help decrypt
return 2
fi
[[ "''${targets}" = "" ]] && targets=(*.gpg)
process() {
gpg --decrypt --output "''${target%.gpg}" "''${target}"