From 21e393464645c76c949d74180ce04b7507e0d738 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 10 Dec 2013 22:13:25 -0200 Subject: Adding 'teardown' action --- lib/keyringer/functions | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'lib/keyringer/functions') diff --git a/lib/keyringer/functions b/lib/keyringer/functions index 872dac9..0e795ee 100755 --- a/lib/keyringer/functions +++ b/lib/keyringer/functions @@ -206,10 +206,17 @@ function keyringer_shred { echo "$message $path using $tool..." if [ -d "$path" ]; then - find $path -exec $tool -f {} \; - rmdir $path + if [ "$tool" == "wipe" ] || [ "$tool" == "rm" ]; then + $tool -rf $path + else + find $path -exec $tool -uf {} \; + fi else - $tool -f "$path" + if [ "$tool" == "wipe" ] || [ "$tool" == "rm" ]; then + $tool -f "$path" + else + $tool -uf "$path" + fi fi } -- cgit v1.2.3