Skip to content

Commit

Permalink
Added delete option
Browse files Browse the repository at this point in the history
  • Loading branch information
reasonablytall committed Apr 23, 2018
1 parent 16edcfa commit 11e21b9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions yarsync
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ else
rsync_opts="-az"
fi

if [[ $delete ]]; then
rsync_opts="$rsync_opts --delete"
fi

inwait_events="-e modify -e attrib -e close_write -e move -e move_self \
-e create -e delete -e delete_self -e unmount"

Expand All @@ -103,3 +107,4 @@ rsync $rsync_args | sed "s/^/rsync: /"
while inotifywait $inwait_args | sed "s/^/inotifywait: /"; do
rsync $rsync_args | sed "s/^/rsync: /"
done

0 comments on commit 11e21b9

Please sign in to comment.