shred instead of rm

This commit is contained in:
ville rantanen
2016-08-31 12:30:41 +03:00
parent b7009615dc
commit d6a30184c6

View File

@@ -18,6 +18,8 @@ Changed file is always backed up as .old
}
[[ -z "$1" ]] && helpexit
[[ "$1" = "-h" ]] && helpexit
RM=rm
which shred &> /dev/null && RM="shred -u"
set -x
if [[ ! "$1" == *\.gpg ]]
then
@@ -40,7 +42,7 @@ edit=`date +%s -r $unc`
if [ -s "$unc" ]
then vim -i NONE -n "$unc"
else echo Error in decrypting
rm "$unc"
$RM "$unc"
exit 1
fi
@@ -54,4 +56,4 @@ then
mv -f "$1".tmp "$1"
fi
fi
rm "$unc"
$RM "$unc"