sync with r
This commit is contained in:
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user