Skip to content

Instantly share code, notes, and snippets.

@lrhoek
Created September 21, 2015 00:17
Show Gist options
  • Save lrhoek/293781955d586b6ff31d to your computer and use it in GitHub Desktop.
Save lrhoek/293781955d586b6ff31d to your computer and use it in GitHub Desktop.
Automatically rsync a directory with fswatch
#!/bin/bash
fswatch -0 -o $1 | xargs -0 -I {} rsync -avz --delete $1 $2
@lrhoek
Copy link
Author

lrhoek commented Sep 21, 2015

Use: sync.sh [source] [target]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment