diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-12-10 22:13:25 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-12-10 22:13:25 -0200 |
commit | 21e393464645c76c949d74180ce04b7507e0d738 (patch) | |
tree | 877bad044cc49ea185737d810ab82040b5f005c1 /lib/keyringer/functions | |
parent | b2b3a02e33c9efbbfce46a658360189ecc8dda2a (diff) | |
download | keyringer-21e393464645c76c949d74180ce04b7507e0d738.tar.gz keyringer-21e393464645c76c949d74180ce04b7507e0d738.tar.bz2 |
Adding 'teardown' action
Diffstat (limited to 'lib/keyringer/functions')
-rwxr-xr-x | lib/keyringer/functions | 13 |
1 files changed, 10 insertions, 3 deletions
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 } |