From feea0661a7e4b4270e2b869155e1a3acebcaba61 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 27 Aug 2007 18:56:03 +0200 Subject: [PATCH] use . as a seperator for marking, not directly in the dir, which will be removed anyway. --- ccollect.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ccollect.sh b/ccollect.sh index a123ca2..c621648 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -14,7 +14,7 @@ CPREEXEC="${CDEFAULTS}/pre_exec" CPOSTEXEC="${CDEFAULTS}/post_exec" TMP=$(mktemp "/tmp/$(basename $0).XXXXXX") -VERSION=0.6.1 +VERSION=0.6.2 RELEASE="2007-08-20" HALF_VERSION="ccollect ${VERSION}" FULL_VERSION="ccollect ${VERSION} (${RELEASE})" @@ -394,10 +394,10 @@ while [ "${i}" -lt "${no_sources}" ]; do # # Check for incomplete backups # - ( cd "${c_dest}" 2>/dev/null && ls -1 "${INTERVAL}"*"/${c_marker}" > "${TMP}" 2>/dev/null) + ( cd "${c_dest}" 2>/dev/null && ls -1 "${INTERVAL}"*".${c_marker}" > "${TMP}" 2>/dev/null) while read incomplete; do - realincomplete=$(echo ${incomplete} | sed "s/${c_marker}\$//") + realincomplete=$(echo ${incomplete} | sed "s/\\.${c_marker}\$//") _techo "Incomplete backup: ${realincomplete}" if [ "${DELETE_INCOMPLETE}" = "yes" ]; then _techo "Deleting ${realincomplete} ..." @@ -422,7 +422,7 @@ while [ "${i}" -lt "${no_sources}" ]; do _techo "Removing ${remove} backup(s)..." ( cd "${c_dest}" 2>/dev/null && ls -p1 | grep "^${INTERVAL}\..*/\$" | \ - sort -n | head -n "${remove}" > "${TMP}" ) + sort -n | head -n "${remove}" ) > "${TMP}" while read to_remove; do _techo "Removing ${to_remove} ..."