Merge remote-tracking branch 'upstream/master' into add-antigen-helper
This commit is contained in:
@@ -202,12 +202,16 @@ function shred_file() {
|
|||||||
if which shred >/dev/null ; then
|
if which shred >/dev/null ; then
|
||||||
CMD=shred
|
CMD=shred
|
||||||
OPT=-u
|
OPT=-u
|
||||||
|
elif which srm >/dev/null ; then
|
||||||
|
#NOTE: srm by default uses 35-pass Gutmann algorithm
|
||||||
|
CMD=srm
|
||||||
|
OPT=-f
|
||||||
else
|
else
|
||||||
CMD=rm
|
CMD=rm
|
||||||
OPT=-f
|
OPT=-f
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$CMD $OPT "$name"
|
$CMD $OPT -- "$name"
|
||||||
}
|
}
|
||||||
|
|
||||||
function md5sum_file() {
|
function md5sum_file() {
|
||||||
@@ -324,7 +328,7 @@ function vcs_remove() {
|
|||||||
}
|
}
|
||||||
# Mercurial
|
# Mercurial
|
||||||
function vcs_remove_hg() {
|
function vcs_remove_hg() {
|
||||||
hg rm -A """$@"""
|
hg rm -A -- """$@"""
|
||||||
}
|
}
|
||||||
# Git
|
# Git
|
||||||
function vcs_remove_git() {
|
function vcs_remove_git() {
|
||||||
|
|||||||
22
bin/blackbox_shred_all_files
Executable file
22
bin/blackbox_shred_all_files
Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/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:'
|
||||||
|
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.'
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
#
|
#
|
||||||
# blackbox_edit_end.sh -- Re-encrypt file after edits.
|
# blackbox_update_all_files -- Re-encrypt file after edits.
|
||||||
#
|
#
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|||||||
Reference in New Issue
Block a user