diff --git a/push-newer-pics b/push-newer-pics index e0b23f1..c4eba6d 100755 --- a/push-newer-pics +++ b/push-newer-pics @@ -1,7 +1,7 @@ #!/bin/bash # # push-newer-pics — Wrapper for sync-newer-images with default paths. -# Copies new images from ~/Pictures → ~/mnt/mini.nas/miniShare1/Pictures +# Copies new images/videos from ~/Pictures → ~/mnt/mini.nas/miniShare1/Pictures # # Usage: push-newer-pics [--help] [-u|--update] diff --git a/sync-newer-images b/sync-newer-images index c569388..6b3ffd9 100755 --- a/sync-newer-images +++ b/sync-newer-images @@ -1,14 +1,14 @@ #!/bin/bash # -# sync-newer-images — For each top-level image in SRC, copy it to DEST -# if it doesn't already exist anywhere under DEST. +# sync-newer-images — For each top-level image or video in SRC, copy it to +# DEST if it doesn't already exist anywhere under DEST. # Works on Linux and macOS (bash 3.2+ compatible). usage() { cat <<'EOF' Usage: sync-newer-images [options] -For each top-level image in source, copy it into destination if no +For each top-level image or video in source, copy it into destination if no file with the same name exists anywhere under destination. Options: @@ -59,6 +59,7 @@ for srcfile in "$SRC"/*; do ext="${srcfile##*.}" case "$(echo "$ext" | tr '[:upper:]' '[:lower:]')" in jpg|jpeg|png|gif|heic|webp|bmp|tiff|tif) ;; + mov|mp4|m4v|avi|mkv|3gp) ;; *) continue ;; esac @@ -76,4 +77,4 @@ for srcfile in "$SRC"/*; do fi done -echo "Copied ${copied} image(s) from ${SRC} into ${DEST}" +echo "Copied ${copied} image(s)/video(s) from ${SRC} into ${DEST}"