Life syncronization between two hosts using fswatch and rsync.

AutoRSync is a live file syncronization utility written in bash using rsync and fswatch.
It is able to monitor changes and synchronize files rapidly from one host to another.
Briefly, this Bash script is a conglomerate of fswatch|rsync.
AutoRSync gives ability to edit files on one host and keep updated mirror in another one.
Comparing to docker-volumes autorsync scheme consumes two times more space, but half-hundred times faster.
rsync
autorsync /local/path/ remote_host:/target/path/
`
Trailing slash in SRC is important. See stackoverflow.com.ToDo write here more detailed examples and explanation
See also usecase-docker.md about how to configure Docker container.
Prerequisties
* bash version 4 or later,
* rsync version 3 or later,
* fswatch,
* ssh,
perl (todo rm dependancy)*.
* pgrep and pkill from package psmisc`sh
brew install bash coreutils rsync fswatch perl findutils gnu-sed
`
To run ./test-autorsync.bash also need brew install tree pstree`( cd /usr/local/bin && curl -LO https://gitlab.com/kyb/autorsync/raw/artifacts/master/autorsync && chmod +x autorsync ; )
or use download link
npm install --global autorsync
or the same npm i -g autorsync
---
Inspired by article [How to speed up shared file access in Docker for Mac][2] by Sebastian Barthel
[2]: https://medium.freecodecamp.org/speed-up-file-access-in-docker-for-mac-fbeee65d0ee7
[3]: https://www.jeffgeerling.com/blog/2020/revisiting-docker-macs-performance-nfs-volumes