From 842e668c4cea94b4befec5e356592a23bddaae6e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 17 Mar 2008 12:11:09 +0100 Subject: [PATCH] fix another endless loop --- ccollect.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ccollect.sh b/ccollect.sh index 31ea2a8..61a0593 100755 --- a/ccollect.sh +++ b/ccollect.sh @@ -457,7 +457,7 @@ while [ "${i}" -lt "${no_sources}" ]; do j=0 while [ "$j" -lt "$i" ]; do - eval realincomplete=\"\$incomplete_$i\" + eval realincomplete=\"\$incomplete_$j\" _techo "Incomplete backup: ${realincomplete}" if [ "${DELETE_INCOMPLETE}" = "yes" ]; then _techo "Deleting ${realincomplete} ..." @@ -492,11 +492,12 @@ while [ "${i}" -lt "${no_sources}" ]; do done < "${TMP}" j=0 - while [ $i -gt 0 ]; do - eval to_remove=\"remove_$i\" + while [ "$j" -lt "$i" ]; do + eval to_remove=\"remove_$j\" _techo "Removing ${to_remove} ..." pcmd echo rm ${VVERBOSE} -rf "${to_remove}" || \ _exit_err "Removing ${to_remove} failed." + j=$((j+1)) done fi