Skip to content

Instantly share code, notes, and snippets.

@kespindler
Created April 18, 2012 19:10
Show Gist options
  • Save kespindler/2415840 to your computer and use it in GitHub Desktop.
Save kespindler/2415840 to your computer and use it in GitHub Desktop.
Directory push/pull with python fabric
from fabric.api import *
from fabric.contrib import project as project
SYNC_DIR = 'MY_DIRECTORY'
def push():
local('rsync -avz --exclude fabfile.py --exclude fabfile.pyc . %s' % SYNC_DIR)
def pull():
local('rsync -avz --exclude fabfile.py --exclude fabfile.pyc %s .' % SYNC_DIR)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment