diff options
author | Bill <bill@billserver.senders.io> | 2021-04-28 11:26:15 -0400 |
---|---|---|
committer | Bill <bill@billserver.senders.io> | 2021-04-28 11:26:15 -0400 |
commit | c1f9f9297a3645109d6993feb7c62045fc9527ef (patch) | |
tree | 7bb9e35797676bd1c28869d4f5ce23382b6490b9 | |
parent | 328a834d5db707446a33b152112122b6e3290c9c (diff) |
Only find files - not directories
This prevents duplicate fetching from occuring
-rwxr-xr-x | ssync | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -53,7 +53,7 @@ log "Syncing files since: $PREV_RUN_DATE" log "Fetching files" mkdir -p $RUN_DIR -ssh -i $KEY_FILE $REMOTE "find ${REMOTE_DIR} -newermt ${PREV_RUN_DATE} -exec realpath --relative-to ${REMOTE_DIR} {} \;" >> $CURGET_FILE +ssh -i $KEY_FILE $REMOTE "find ${REMOTE_DIR} -type f -newermt ${PREV_RUN_DATE} -exec realpath --relative-to ${REMOTE_DIR} {} \;" >> $CURGET_FILE comm -23 <(sort -u $CURGET_FILE) <(sort -u $FETCHED_FILE) > $FETCH_FILE COUNT=$(wc -l $FETCH_FILE | cut -d' ' -f1) |