From 9c6ecfce289f631489e8e4cede01b073fb3ea006 Mon Sep 17 00:00:00 2001 From: Jakub Fojt Date: Wed, 23 Feb 2022 20:51:56 +0100 Subject: [PATCH] rsync --- .bashrc.kuba | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.bashrc.kuba b/.bashrc.kuba index c9a4f74..9ea484f 100755 --- a/.bashrc.kuba +++ b/.bashrc.kuba @@ -69,6 +69,32 @@ npz_preview() { python -ic "$npz_py_str" "$1" } +rsync_wrap() { + cmd="rsync -a -R -r --copy-links --exclude .git --exclude __pycache__ --progress" + if [ $# == 0 ]; then + echo "Usage rsync_wrap [...] + +Useful for synchronizing repositories + +Calls $cmd [...]" + return + fi + $cmd $@ +} + +rsync_wrap_huge() { + cmd="rsync -a -R -r --copy-links --size-only --exclude .git --exclude __pycache__ --progress" + if [ $# == 0 ]; then + echo "Usage rsync_wrap_huge [...] + +Useful for synchronizing repositories. Does not do checksum + +Calls $cmd [...]" + return + fi + $cmd $@ +} + # Source git prompt source_existing ~/scripts/git-prompt.sh source_existing ~/.bash_prompt.kuba