From 8d2d6f9cb82682266452c34bc266467fddb46292 Mon Sep 17 00:00:00 2001 From: cimryan Date: Wed, 24 Oct 2018 19:50:22 -0700 Subject: [PATCH] Use the right variable for the number of files moved. --- cifs_archive/archive-clips.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cifs_archive/archive-clips.sh b/cifs_archive/archive-clips.sh index e1b3a17..26b634f 100644 --- a/cifs_archive/archive-clips.sh +++ b/cifs_archive/archive-clips.sh @@ -2,17 +2,17 @@ log "Moving clips to archive..." -move_count=0 +NUM_FILES_MOVED=0 for file_name in "$CAM_MOUNT"/TeslaCam/saved*; do [ -e "$file_name" ] || continue log "Moving $file_name ..." mv -- "$file_name" "$ARCHIVE_MOUNT" >> "$LOG_FILE" 2>&1 || echo "" log "Moved $file_name." - move_count=$((move_count + 1)) + NUM_FILES_MOVED=$((NUM_FILES_MOVED + 1)) done -log "Moved $move_count file(s)." +log "Moved $NUM_FILES_MOVED file(s)." -/root/bin/send-pushover "$num_files_moved" +/root/bin/send-pushover "$NUM_FILES_MOVED" log "Finished moving clips to archive."