parent
e7e8425c3b
commit
2677932c56
|
@ -195,7 +195,8 @@ while true; do
|
|||
fi
|
||||
done
|
||||
|
||||
if (( CM_MAX_CLIPS )) && (( "$(wc -l < "$cache_file")" > CM_MAX_CLIPS_THRESH )); then
|
||||
# The cache file may not exist if this is the first run and data is skipped
|
||||
if (( CM_MAX_CLIPS )) && [[ -f "$cache_file" ]] && (( "$(wc -l < "$cache_file")" > CM_MAX_CLIPS_THRESH )); then
|
||||
info "Trimming clip cache to CM_MAX_CLIPS ($CM_MAX_CLIPS)"
|
||||
trunc_tmp=$(mktemp)
|
||||
tail -n "$CM_MAX_CLIPS" "$cache_file" | uniq > "$trunc_tmp"
|
||||
|
|
Loading…
Reference in a new issue