Skip to content

Commit

Permalink
Revert "Exclude symlinks from sync"
Browse files Browse the repository at this point in the history
This reverts commit b47dd70.

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).
  • Loading branch information
jankatins committed Aug 11, 2019
1 parent f039e38 commit 86f43d8
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions systemd/grive-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit 86f43d8

Please sign in to comment.