I'm trying to watch a folder, and its subfolders for any changes in the files (HTML/CSS/JS/Etc). Once a file has changed, I want to upload it to a mounted drive from a remote server. Currently, I am using this in terminal:
fswatch -o ~/Desktop/Site/ | xargs -n1 sh ~/Documents/App\ Syncs/rsync_files.sh
rsync_files.sh:
rsync -rvzut --info=progress2 --delete-after --delete-excluded --exclude-from=/Users/ME/Documents/App\ Syncs/exclude_list.txt /Users/ME/Desktop/Site/ /Volumes/devroot$/Site;
The thought is that the fswatch will call the rsync each time there is a change in the file structure. It works, but it is VERY slow, esp over a crappy connection.
My question is, am I doing this right or is there a better solution for what I'm trying to accomplish? Can my rsync command be better optimized? Is there an app already made that will do this very thing for me?
Basically I want to mimic the file panel in Dreamweaver 2014 without having to use Dreamweaver. My setup is Sublime Text 3 and Codekit 2.