From 8ace2a6520c8de3260314666c60a4b5ba008221d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 17 Mar 2008 12:06:17 +0100 Subject: [PATCH] fix endless loop --- ccollect.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ccollect.sh b/ccollect.sh index 32423b1..b5ed4bc 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -451,18 +451,20 @@ while [ "${i}" -lt "${no_sources}" ]; do i=0 while read incomplete; do - eva incomplete_$i=$(echo ${incomplete} | sed "s/\\.${c_marker}\$//") + eval incomplete_$i=\"$(echo ${incomplete} | sed "s/\\.${c_marker}\$//")\" i=$(($i+1)) done < "${TMP}" - while [ $i -gt 0 ]; do - eval realincomplete=\"incomplete_$i\" + j=0 + while [ "$j" -lt "$i" ]; do + eval realincomplete=\"\$incomplete_$i\" _techo "Incomplete backup: ${realincomplete}" if [ "${DELETE_INCOMPLETE}" = "yes" ]; then _techo "Deleting ${realincomplete} ..." pcmd rm $VVERBOSE -rf "${ddir}/${realincomplete}" || \ _exit_err "Removing ${realincomplete} failed." fi + i=$((i+i)) done #