Revert "Exclude symlinks from sync"

This reverts commit b47dd70f35.

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).
pull/245/head
Jan Schulz 2018-12-03 21:46:52 +01:00 committed by Jan Katins
parent ffb744a59b
commit c7a949dedd
1 changed files with 0 additions and 6 deletions

View File

@ -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."