Skip to content

Commit

Permalink
Merge pull request #245 from jankatins/revert_symlink_handling_in_sync
Browse files Browse the repository at this point in the history
Revert "Exclude symlinks from sync"
  • Loading branch information
vitalif authored May 27, 2021
2 parents dedb762 + c7a949d commit e6fcc63
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 @@ -81,12 +81,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 e6fcc63

Please sign in to comment.