project sync.

This commit is contained in:
Ivan Malison 2015-01-22 13:09:20 -08:00
parent 5b2a1303d0
commit 4d42656755

View File

@ -331,3 +331,12 @@ function add_ssh_key {
[[ $(tail -c1 ~/.ssh/authorized_keys | wc -l) -gt 0 ]] || echo "\n" >> ~/.ssh/authorized_keys; [[ $(tail -c1 ~/.ssh/authorized_keys | wc -l) -gt 0 ]] || echo "\n" >> ~/.ssh/authorized_keys;
echo $1 >> ~/.ssh/authorized_keys; echo $1 >> ~/.ssh/authorized_keys;
} }
function git_free_ssh_rsync {
echo $1
rsync -avz -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress --exclude=".git/" $(readlink -f "$1") $2:$1
}
function project_sync {
git_free_ssh_rsync '~/Projects/'"$1"'/' $2
}