Skip to content

Instantly share code, notes, and snippets.

@DeaconDesperado
Last active August 29, 2015 14:01
Show Gist options
  • Save DeaconDesperado/f08faefa3a90b85d75bd to your computer and use it in GitHub Desktop.
Save DeaconDesperado/f08faefa3a90b85d75bd to your computer and use it in GitHub Desktop.

Revisions

  1. DeaconDesperado revised this gist May 21, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion Makefile
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,2 @@
    watch:
    watchmedo shell-command --recursive --command='rsync -avt --exclude '*.pyc' --exclude '.git' . user@remotehost:folder/path'
    watchmedo shell-command --recursive --command='rsync -avt --delete --exclude '*.pyc' --exclude '.git' . user@remotehost:folder/path'
  2. DeaconDesperado created this gist May 21, 2014.
    2 changes: 2 additions & 0 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    watch:
    watchmedo shell-command --recursive --command='rsync -avt --exclude '*.pyc' --exclude '.git' . user@remotehost:folder/path'
    8 changes: 8 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    #Sync directories on file change:

    * Install [watchdog](https://pythonhosted.org/watchdog/installation.html): `sudo pip install watchdog`
    * Copy the contents of the Makefile in this gist to a file called `Makefile` in your project folder
    * Change the paths and options in the makefile as needed!
    * user@remotehost should be your user and hostname on the remote machine. Everything after the colon is the filepath on the remote
    * exclude flags can be used to ignore source control or bytecode files
    * Use your new makefile! From the same directory as the Makefile: `make watch`