Created
March 9, 2012 15:06
-
-
Save msadouni/2006892 to your computer and use it in GitHub Desktop.
Sync a folder via rsync / ssh
This file contains hidden or 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
#!/bin/bash | |
export_to='/path/to/export/without/slash' | |
login='login' | |
server='server.com' | |
root='/path/to/app/without/slash' | |
rm -rf $export_to | |
git checkout-index -a --prefix=$export_to/ | |
rsync -avz -e ssh $export_to/ $login@$server:$root --exclude-from 'exclude.rsync' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment