24 lines
539 B
Bash
Executable File
24 lines
539 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
#
|
|
# blackbox_shred_all_files -- shred all decrypted versions of encrypted files
|
|
#
|
|
|
|
set -e
|
|
. _blackbox_common.sh
|
|
|
|
echo '========== ENCRYPTED FILES THAT WERE UNLOCKED:'
|
|
awk <"$BB_FILES" '{ print " " $1 ".gpg" }'
|
|
|
|
echo '========== FILES THAT WILL BE SHREDDED:'
|
|
need_warning=false
|
|
for i in $(<$BB_FILES) ; do
|
|
unencrypted_file=$(get_unencrypted_filename "$i")
|
|
encrypted_file=$(get_encrypted_filename "$i")
|
|
if [[ -f "$unencrypted_file" ]]; then
|
|
shred_file "$unencrypted_file"
|
|
fi
|
|
done
|
|
|
|
echo '========== DONE.'
|