Skip to content

Instantly share code, notes, and snippets.

@gld1982ltd
Forked from kespindler/gist:2415840
Last active December 19, 2015 13:29
Show Gist options
  • Save gld1982ltd/5962906 to your computer and use it in GitHub Desktop.
Save gld1982ltd/5962906 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