]> gitweb.fluxo.info Git - keyringer.git/commitdiff
Warn user if keyringer_shred is using rm
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 14 Nov 2013 17:02:56 +0000 (15:02 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 14 Nov 2013 17:02:56 +0000 (15:02 -0200)
lib/keyringer/functions

index fcec045e290e80e61fd4335b58f901a24a0422e9..4d97f34cb4ca7ef4cf1934f28213ac2f0cab284f 100755 (executable)
@@ -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 {} \;