mirror of https://github.com/vitalif/grive2
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
parent
ffb744a59b
commit
c7a949dedd
|
@ -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."
|
||||
|
|
Loading…
Reference in New Issue