restore small optimizations. quote variable for shellcheck.

pull/224/head
joshr 6 years ago
parent adc522a9d3
commit 65a7118d25

@ -146,6 +146,9 @@ function hide {
local recipients
recipients=$(_get_recipients)
local secrets_dir_keys
secrets_dir_keys=$(_get_secrets_dir_keys)
local input_path
local output_path
input_path=$(_append_root_path "$filename")
@ -156,10 +159,8 @@ function hide {
# encrypt file only if required
if [[ "$fsdb_file_hash" != "$file_hash" ]]; then
# shellcheck disable=2086
local secrets_dir_keys
secrets_dir_keys=$(_get_secrets_dir_keys)
$SECRETS_GPG_COMMAND --homedir "$secrets_dir_keys" "--no-permission-warning" --use-agent --yes --trust-model=always --encrypt \
$recipients -o "$output_path" "$input_path" > /dev/null 2>&1
"$recipients" -o "$output_path" "$input_path" > /dev/null 2>&1
local exit_code=$?
if [[ "$exit_code" -ne 0 ]]; then
_abort "problem encrypting file with gpg: exit code $exit_code: $filename"

@ -25,9 +25,10 @@ function killperson {
_abort "at least one email is required for killperson."
fi
for email in "${emails[@]}"; do
# Getting the local git-secret `gpg` key directory:
local secrets_dir_keys
secrets_dir_keys=$(_get_secrets_dir_keys)
for email in "${emails[@]}"; do
$SECRETS_GPG_COMMAND --homedir "$secrets_dir_keys" --no-permission-warning --batch --yes --delete-key "$email"
local exit_code=$?
if [[ "$exit_code" -ne 0 ]]; then

Loading…
Cancel
Save