summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-11-14 15:02:56 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-11-14 15:02:56 -0200
commitc10fdd5e50d1543196e0aeb29ee8032f0ad5aa0b (patch)
tree4189628bff2aff53b4bd52812b6b55a19868a91d
parent6c08cb89106d0ab22749993ef860f593bb60b344 (diff)
downloadkeyringer-c10fdd5e50d1543196e0aeb29ee8032f0ad5aa0b.tar.gz
keyringer-c10fdd5e50d1543196e0aeb29ee8032f0ad5aa0b.tar.bz2
Warn user if keyringer_shred is using rm
-rwxr-xr-xlib/keyringer/functions4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/keyringer/functions b/lib/keyringer/functions
index fcec045..4d97f34 100755
--- a/lib/keyringer/functions
+++ b/lib/keyringer/functions
@@ -148,6 +148,7 @@ function keyringer_set_tmpfile {
function keyringer_shred {
local path="$1"
local tool
+ local message="Removing"
if [ -z "$path" ]; then
return
@@ -160,10 +161,11 @@ function keyringer_shred {
tool="shred"
else
# Worst implementation
+ message="WARNING $message"
tool="rm"
fi
- echo "Removing $path using $tool..."
+ echo "$message $path using $tool..."
if [ -d "$path" ]; then
find $path -exec $tool -f {} \;