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