Skip to content

Instantly share code, notes, and snippets.

@Kerollmops
Created March 19, 2020 10:14
Show Gist options
  • Save Kerollmops/2beb1927d8cff03b65e27904dfabfb2d to your computer and use it in GitHub Desktop.
Save Kerollmops/2beb1927d8cff03b65e27904dfabfb2d to your computer and use it in GitHub Desktop.
Remote sync a cargo repository by using fswatch and ssh with a custom identity key.
fswatch --exclude '.git' --exclude 'target' . | while read num; do
rsync -azP --exclude=.git --exclude=target -e 'ssh -i ~/.ssh/id_rsa' . root@xxx.xxx.xxx.xxx:<DEST>
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment