2014-08-29 20:21:02 +00:00
|
|
|
#!/usr/bin/env bash
|
2014-07-07 20:30:16 -04:00
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# blackbox_edit_start.sh -- Decrypt a file for editing.
|
|
|
|
|
#
|
|
|
|
|
|
2014-08-28 20:47:32 +00:00
|
|
|
. _blackbox_common.sh
|
2014-07-07 20:30:16 -04:00
|
|
|
|
|
|
|
|
for param in """$@""" ; do
|
|
|
|
|
unencrypted_file=$(get_unencrypted_filename "$param")
|
|
|
|
|
encrypted_file=$(get_encrypted_filename "$param")
|
|
|
|
|
|
|
|
|
|
fail_if_not_on_cryptlist "$unencrypted_file"
|
|
|
|
|
fail_if_not_exists "$encrypted_file" "This should not happen."
|
|
|
|
|
rm -f "$unencrypted_file"
|
|
|
|
|
|
|
|
|
|
prepare_keychain
|
|
|
|
|
decrypt_file "$encrypted_file" "$unencrypted_file"
|
|
|
|
|
done
|