sync with r
This commit is contained in:
@@ -61,14 +61,19 @@ fi
|
|||||||
# 2. One-way rsync contents of ~/Pictures → share subpath
|
# 2. One-way rsync contents of ~/Pictures → share subpath
|
||||||
MP="${MOUNTPOINT}/${SUBPATH}"
|
MP="${MOUNTPOINT}/${SUBPATH}"
|
||||||
echo "[sync-pictures] Syncing ${SOURCE}/ → ${MP}/"
|
echo "[sync-pictures] Syncing ${SOURCE}/ → ${MP}/"
|
||||||
RSYNC_FLAGS=(-vu --progress --stats --exclude=".DS_Store")
|
if [ -n "${RECURSIVE}" ]; then
|
||||||
if [ -z "${RECURSIVE}" ]; then
|
rsync -vur \
|
||||||
RSYNC_FLAGS+=(--exclude='*/')
|
|
||||||
fi
|
|
||||||
|
|
||||||
rsync "${RSYNC_FLAGS[@]}" \
|
|
||||||
"${SOURCE}/" \
|
"${SOURCE}/" \
|
||||||
"${MP}/"
|
"${MP}/" \
|
||||||
|
--progress --stats \
|
||||||
|
--exclude=".DS_Store"
|
||||||
|
else
|
||||||
|
rsync -vu --exclude='*/' \
|
||||||
|
"${SOURCE}/" \
|
||||||
|
"${MP}/" \
|
||||||
|
--progress --stats \
|
||||||
|
--exclude=".DS_Store"
|
||||||
|
fi
|
||||||
|
|
||||||
# 3. Run neatcli organize on both source and dest
|
# 3. Run neatcli organize on both source and dest
|
||||||
if command -v neatcli &>/dev/null; then
|
if command -v neatcli &>/dev/null; then
|
||||||
|
|||||||
Reference in New Issue
Block a user