From 4b7102f5dcaf068d08a9b37d3fa787902eb00c31 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Fri, 21 Mar 2014 02:06:00 -0700 Subject: [PATCH] don't update existing timestamps --- meow.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/meow.sh b/meow.sh index 9657aed..9de6e5c 100644 --- a/meow.sh +++ b/meow.sh @@ -73,16 +73,15 @@ runfilter() { # {action} [database] now="$(date +%s)" while IFS=$SEP read -r time tid title; do - [ -n "${already[$tid]}" ] \ - || $action $time $tid "$title" \ - || { + [ -n "${already[$tid]}" ] || { + $action $time $tid "$title" && already[$tid]="$now" + } || { echo "[meow.sh] failed to run $action" >&2 echo "[meow.sh] torrent title: $title" >&2 echo "[meow.sh] torrent id: $tid" >&2 ret=1 break } - already[$tid]="$now" done < <(for regex in "${searchregex[@]}"; do searchfilter "$db" "${regex:1}" done)