Gpg : Decrypt all .gpg files by default.
This commit is contained in:
parent
f727a5f97c
commit
5059f25ad6
|
@ -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}"
|
||||
|
|
Loading…
Reference in a new issue