-
-
Save gld1982ltd/5962906 to your computer and use it in GitHub Desktop.
Directory push/pull with python fabric
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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