From 4d42656755e846294b96afe8fe1582dd712f24cc Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 22 Jan 2015 13:09:20 -0800 Subject: [PATCH] project sync. --- dotfiles/lib/shellenv/functions.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dotfiles/lib/shellenv/functions.sh b/dotfiles/lib/shellenv/functions.sh index 7bea8099..7c24e46e 100644 --- a/dotfiles/lib/shellenv/functions.sh +++ b/dotfiles/lib/shellenv/functions.sh @@ -331,3 +331,12 @@ function add_ssh_key { [[ $(tail -c1 ~/.ssh/authorized_keys | wc -l) -gt 0 ]] || echo "\n" >> ~/.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 +}