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