forked from ungleich-public/ccollect
cleanup delete_from_file(): clean suffix stuff
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
parent
4865f3c8c6
commit
8a70e30d97
1 changed files with 2 additions and 3 deletions
|
@ -108,10 +108,9 @@ pcmd()
|
|||
delete_from_file()
|
||||
{
|
||||
file="$1"; shift
|
||||
suffix="$1" # only set for delete_incomplete
|
||||
# [ "$#" = 1 ] && suffix="$1" && shift
|
||||
suffix="$1" # only set, if deleting incomplete backups
|
||||
while read to_remove; do
|
||||
set -- "$@" "${ddir}/${to_remove}"
|
||||
set -- "$@" "${to_remove}"
|
||||
[ "$suffix" ] && set -- "$@" "$(echo ${to_remove} | sed "s/$suffix\$//")"
|
||||
done < "${file}"
|
||||
_techo "Removing $@ ..."
|
||||
|
|
Loading…
Reference in a new issue