forked from ungleich-public/ccollect
simplify backup counting code
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
51db5e1204
commit
05de81e0f0
1 changed files with 1 additions and 1 deletions
2
ccollect
2
ccollect
|
@ -436,7 +436,7 @@ while [ "${source_no}" -lt "${no_sources}" ]; do
|
||||||
#
|
#
|
||||||
# Check: maximum number of backups is reached?
|
# Check: maximum number of backups is reached?
|
||||||
#
|
#
|
||||||
count="$(ls -1 | grep "^${INTERVAL}\\." | wc -l | sed 's/^ *//g')" \
|
count="$(ls -1 | grep -c "^${INTERVAL}\\.")" \
|
||||||
|| _exit_err "Counting backups failed"
|
|| _exit_err "Counting backups failed"
|
||||||
|
|
||||||
_techo "Existing backups: ${count} Total keeping backups: ${c_interval}"
|
_techo "Existing backups: ${count} Total keeping backups: ${c_interval}"
|
||||||
|
|
Loading…
Reference in a new issue