From c7a949deddefe52574a336ff9f4833f7d44a3bf4 Mon Sep 17 00:00:00 2001 From: Jan Schulz Date: Mon, 3 Dec 2018 21:46:52 +0100 Subject: [PATCH] Revert "Exclude symlinks from sync" This reverts commit b47dd70f35ff74362c7094a55123a1be2618e5be. This could trigger a infinite loop between the timer unit (running a sync and changing the griveignore file at the start) and the changes unit (reacting to the griveignore change and retriggering the sync). --- systemd/grive-sync.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/systemd/grive-sync.sh b/systemd/grive-sync.sh index bb837ba..8e48670 100755 --- a/systemd/grive-sync.sh +++ b/systemd/grive-sync.sh @@ -79,12 +79,6 @@ sync_directory() { while [[ "${TIME_AT_START}" -lt "${TIME_AT_END}" ]]; do echo "Syncing "${_directory}"..." TIME_AT_START="$(stat -c %Y "$LOCKFILE")" - # exclude symlinks from sync - cat "${_directory}"/.griveignore 2>/dev/null | sed '/#LINKS-EDIT_BEFORE_THIS$/,$d' > /tmp/.griveignore.base - cp /tmp/.griveignore.base "${_directory}"/.griveignore - rm /tmp/.griveignore.base - echo "#LINKS-EDIT_BEFORE_THIS" >> "${_directory}"/.griveignore - ( cd "${_directory}" && find . -type l | sed 's/^.\///g'; ) >> "${_directory}"/.griveignore grive -p "${_directory}" 2>&1 | grep -v -E "^Reading local directories$|^Reading remote server file list$|^Synchronizing files$|^Finished!$" TIME_AT_END="$(stat -c %Y "$LOCKFILE")" echo "Sync of "${_directory}" done."