From d49a1ea9242876fb56d0d9627dbc3250d5fa31de Mon Sep 17 00:00:00 2001 From: Ledmitz Date: Wed, 4 Jan 2023 14:21:52 -0400 Subject: Reports when files match in standard output --- README.md | 3 ++- tmw-cmp-update | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ccbf03c..c37506e 100644 --- a/README.md +++ b/README.md @@ -19,4 +19,5 @@ Ledmitz (2022) ## License Seems small to need a license. I'll pick a goofy named libre one later - +## Changes +* - 2022-01-04: Added echo line to report when files are omitted due to them being the same file diff --git a/tmw-cmp-update b/tmw-cmp-update index 011b704..2b92f10 100755 --- a/tmw-cmp-update +++ b/tmw-cmp-update @@ -46,6 +46,8 @@ for FILE in $(find "$TMW_DIR" -type f); do if [[ "$LOCAL_FILE" != '' ]]; then if [[ $(cmp "$FILE" "$LOCAL_FILE") != '' ]]; then cp -fv "$LOCAL_FILE" "$FILE" + else + echo "Omitting $PATHNAME: Files match" fi elif [[ "$LOCAL_FILE" == '' ]]; then #List files in tmw directory that are not in the local directory -- cgit v1.2.3-60-g2f50