diff --git a/sync-pictures b/sync-pictures index 5b71581..a285eca 100755 --- a/sync-pictures +++ b/sync-pictures @@ -61,15 +61,20 @@ fi # 2. One-way rsync contents of ~/Pictures → share subpath MP="${MOUNTPOINT}/${SUBPATH}" echo "[sync-pictures] Syncing ${SOURCE}/ → ${MP}/" -RSYNC_FLAGS=(-vu --progress --stats --exclude=".DS_Store") -if [ -z "${RECURSIVE}" ]; then - RSYNC_FLAGS+=(--exclude='*/') +if [ -n "${RECURSIVE}" ]; then + rsync -vur \ + "${SOURCE}/" \ + "${MP}/" \ + --progress --stats \ + --exclude=".DS_Store" +else + rsync -vu --exclude='*/' \ + "${SOURCE}/" \ + "${MP}/" \ + --progress --stats \ + --exclude=".DS_Store" fi -rsync "${RSYNC_FLAGS[@]}" \ - "${SOURCE}/" \ - "${MP}/" - # 3. Run neatcli organize on both source and dest if command -v neatcli &>/dev/null; then echo "[sync-pictures] Organizing source: ${SOURCE}"