Fixed #83 blackbox_edit* scripts should accept multiple filenames

This commit is contained in:
tlimoncelli@stackexchange.com
2015-07-24 09:57:34 -04:00
parent 23cc07d1e3
commit 1f2d99436d
3 changed files with 40 additions and 18 deletions

View File

@@ -8,8 +8,10 @@ set -e
source "${0%/*}/_blackbox_common.sh"
for param in "$@" ; do
unencrypted_file=$(get_unencrypted_filename "$param")
encrypted_file=$(get_encrypted_filename "$param")
echo >&2 ========== PLAINFILE '"'$unencrypted_file'"'
fail_if_not_on_cryptlist "$unencrypted_file"
@@ -23,5 +25,7 @@ for param in "$@" ; do
fi
prepare_keychain
# FIXME(tlim): prepare_keychain only needs to run once, outside of the loop.
decrypt_file "$encrypted_file" "$unencrypted_file"
done